Created
November 9, 2012 07:26
-
-
Save 40/4044230 to your computer and use it in GitHub Desktop.
passing data between qml pages - propertyalias.qml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bb.cascades 1.0 | |
Page { | |
property alias label5 : label5 | |
Container { | |
layout: DockLayout {} | |
Label { | |
id: label5 | |
text: "Hello World" | |
} | |
} | |
} | |
Next, you need to attach that qml to the one where you want to access Label5 : main.qml | |
import bb.cascades 1.0 | |
NavigationPane { | |
id: nav | |
Page { | |
Button { | |
onClicked: { | |
pushed.label5.text = "changed" | |
nav.push(pushed) | |
} | |
} | |
} | |
attachedObjects: [ | |
Pushed { | |
id: pushed | |
} | |
] | |
} | |
Here, I wanted to check whether the text gets changed or not hence Im pushing that qml to see the label. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment