StackView Push Params
Solved
QML and Qt Quick
-
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.