If you are sure that your app will stay fixed to those 3 screens, you can get away with something as simple as this:
Rectangle {
id: app
anchors.fill: parent
Row {
anchors.centerIn: parent
Button {
text: "settings"
onClicked: set.visible = true
}
Button {
text: "help"
onClicked: help.visible = true
}
}
}
Rectangle {
id: set
anchors.fill: parent
color: "red"
visible: false
Button {
anchors.centerIn: parent
text: "close"
onClicked: set.visible = false
}
}
Rectangle {
id: help
anchors.fill: parent
color: "blue"
visible: false
Button {
anchors.centerIn: parent
text: "close"
onClicked: help.visible = false
}
}
You have all 3 "screens" in a sequence so that the app screen is on the bottom, with settings and help on top. Then you can switch screens by simply controlling the visibility.
If you want a more dynamic solution, follow my hints from the comments to implement a simple stack view, it is quite easy and will be a good exercise to learn QML.
You definitely don't want to follow the example of Konstantin T., and it is a mystery why such a flawed example was upvoted in the first place. That approach will destroy your app screen every time you open settings or help, going back you will not go to your previous screen, but to a brand new instance of it, losing all your previous input. Also, putting a mouse area on top of that guarantees you will not be able to interact with any of the screen's element.
Item, knowledge of how to create objects dynamically, and how to put them in a JS array so that you can track and manage their visibility and lifetime. - dtech