FluentUI/example/T_MultiWindow.qml

108 lines
2.2 KiB
QML
Raw Normal View History

2023-03-30 21:52:55 +08:00
import QtQuick
import QtQuick.Layouts
import QtQuick.Window
import QtQuick.Controls
import FluentUI
2023-04-06 17:32:21 +08:00
import "./component"
2023-03-13 18:23:46 +08:00
FluScrollablePage{
2023-04-06 17:32:21 +08:00
property string password: ""
property var loginPageRegister: registerForPageResult("/login")
2023-03-13 18:23:46 +08:00
title:"MultiWindow"
2023-03-28 17:53:46 +08:00
leftPadding:10
rightPadding:10
bottomPadding:20
2023-04-06 17:32:21 +08:00
spacing: 0
2023-03-13 21:18:51 +08:00
Connections{
target: loginPageRegister
function onResult(data)
{
password = data.password
}
}
2023-03-13 18:23:46 +08:00
FluArea{
2023-04-03 09:32:06 +08:00
Layout.fillWidth: true
2023-03-13 21:28:35 +08:00
height: 100
2023-03-13 18:23:46 +08:00
paddings: 10
Layout.topMargin: 20
Column{
2023-03-13 21:28:35 +08:00
spacing: 15
2023-03-13 18:23:46 +08:00
anchors{
verticalCenter: parent.verticalCenter
left: parent.left
}
FluText{
text:"页面跳转,不携带任何参数"
}
FluButton{
text:"点击跳转"
onClicked: {
FluApp.navigate("/about")
}
}
}
}
2023-04-06 17:32:21 +08:00
CodeExpander{
Layout.fillWidth: true
code:'FluButton{
text:"点击跳转"
onClicked: {
FluApp.navigate("/about")
}
}
'
}
2023-03-13 18:23:46 +08:00
FluArea{
2023-04-03 09:32:06 +08:00
Layout.fillWidth: true
2023-03-13 21:18:51 +08:00
height: 130
2023-03-13 18:23:46 +08:00
paddings: 10
Layout.topMargin: 20
Column{
2023-03-13 21:18:51 +08:00
spacing: 15
2023-03-13 18:23:46 +08:00
anchors{
verticalCenter: parent.verticalCenter
left: parent.left
}
FluText{
2023-03-13 21:18:51 +08:00
text:"页面跳转并携带参数用户名zhuzichu"
2023-03-13 18:23:46 +08:00
}
FluButton{
2023-03-13 21:18:51 +08:00
text:"点击跳转到登录"
2023-03-13 18:23:46 +08:00
onClicked: {
2023-03-13 21:18:51 +08:00
loginPageRegister.launch({username:"zhuzichu"})
2023-03-13 18:23:46 +08:00
}
}
2023-03-13 21:18:51 +08:00
FluText{
text:"登录窗口返回过来的密码->"+password
}
2023-03-13 18:23:46 +08:00
}
}
2023-04-06 17:32:21 +08:00
CodeExpander{
Layout.fillWidth: true
code:'property var loginPageRegister: registerForPageResult("/login")
Connections{
target: loginPageRegister
function onResult(data)
{
password = data.password
}
}
FluButton{
text:"点击跳转"
onClicked: {
loginPageRegister.launch({username:"zhuzichu"})
}
}
'
}
2023-03-13 18:23:46 +08:00
}