How to link to another qml page via onClicked?
Unsolved
QML and Qt Quick
-
MouseArea {
anchors.fill: parent
onClicked: {
// Only change state when two other rectangle color is red
if ((Qt.colorEqual(rect3.color, "blue") && Qt.colorEqual(rect4.color, "red"))
{pageLoader.source="common/WinScene.qml" } else { stillItchy.visible = true }
As shown above, is it right to state " pageLoader.source="common/WinScene.qml"?? Just to link to another page? My code kinda screwd up..
-
Yes it is OK to load pages via Loader element. Is that what you are asking?
If you have a set of pages you want to switch between, you can use StackView, SwipeView etc. instead.