Make it possible to go back from any page by having a back button on the toolbar

This commit is contained in:
Aleix Pol 2015-06-19 07:22:00 +02:00
parent 46b57003cd
commit d741465473

View file

@ -30,6 +30,17 @@ ApplicationWindow
width: 400 width: 400
height: 500 height: 500
toolBar: RowLayout {
Button {
text: "<"
onClicked: stack.pop()
}
Label {
Layout.fillWidth: true
text: "KDE Connect"
font.pointSize: 20
}
}
StackView { StackView {
id: stack id: stack
anchors { anchors {
@ -85,10 +96,6 @@ ApplicationWindow
ColumnLayout { ColumnLayout {
id: deviceView id: deviceView
property QtObject currentDevice property QtObject currentDevice
Button {
text: "<"
onClicked: stack.pop()
}
Loader { Loader {
Layout.fillHeight: true Layout.fillHeight: true
Layout.fillWidth: true Layout.fillWidth: true