Simplify page pushing
This commit is contained in:
parent
36bcade705
commit
92ac51465f
1 changed files with 3 additions and 13 deletions
|
@ -31,16 +31,6 @@ Kirigami.ApplicationWindow
|
||||||
width: 900
|
width: 900
|
||||||
height: 500
|
height: 500
|
||||||
|
|
||||||
Component {
|
|
||||||
id: findDevicesComp
|
|
||||||
FindDevicesPage {}
|
|
||||||
}
|
|
||||||
|
|
||||||
Component {
|
|
||||||
id: deviceComp
|
|
||||||
DevicePage {}
|
|
||||||
}
|
|
||||||
|
|
||||||
Kirigami.Action {
|
Kirigami.Action {
|
||||||
id: findDevicesAction
|
id: findDevicesAction
|
||||||
text: i18n ("Find devices...")
|
text: i18n ("Find devices...")
|
||||||
|
@ -49,7 +39,7 @@ Kirigami.ApplicationWindow
|
||||||
|
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
root.pageStack.clear()
|
root.pageStack.clear()
|
||||||
root.pageStack.push(findDevicesComp);
|
root.pageStack.push(Qt.resolvedUrl("FindDevicesPage.qml"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -112,7 +102,7 @@ Kirigami.ApplicationWindow
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
root.pageStack.clear()
|
root.pageStack.clear()
|
||||||
root.pageStack.push(
|
root.pageStack.push(
|
||||||
deviceComp,
|
Qt.resolvedUrl("DevicePage.qml"),
|
||||||
{currentDevice: device}
|
{currentDevice: device}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -137,5 +127,5 @@ Kirigami.ApplicationWindow
|
||||||
id: contextDrawer
|
id: contextDrawer
|
||||||
}
|
}
|
||||||
|
|
||||||
pageStack.initialPage: findDevicesComp
|
pageStack.initialPage: Qt.resolvedUrl("FindDevicesPage.qml")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue