Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

StackView Push Params



  • Hello I have a StackView that I use without any problems. When I push a new screen with features, I cannot access the feature.

    main.qml

        StackView {
            id: applicationStack
            initialItem: "qrc:/MainPage.qml"
            anchors.fill: parent
        }
    

    MainPage.qml

                MouseArea {
                    anchors.fill: parent
                    onClicked:  {
                        applicationStack.push("qrc:/SettingsPage.qml", { 'foo': 'bar'})
                    }
                }
    

    SettingPage.qml

    console.log(applicationStack.foo)
    

    Undefined



  • My fault. I must have overlooked defining property.


Log in to reply