Skip to content

Instantly share code, notes, and snippets.

@40
Created November 9, 2012 07:26
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 40/4044230 to your computer and use it in GitHub Desktop.
Save 40/4044230 to your computer and use it in GitHub Desktop.
passing data between qml pages - propertyalias.qml
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