CreatePage.qml Example File
persistentobjects/assets/CreatePage.qml
import bb.cascades 1.0
Page {
titleBar: TitleBar {
title: qsTr("Persistent Objects Sample")
}
Container {
layout: DockLayout {
}
Container {
horizontalAlignment: HorizontalAlignment.Center
verticalAlignment: VerticalAlignment.Center
leftPadding: 30
rightPadding: 30
TextField {
id: firstName
horizontalAlignment: HorizontalAlignment.Center
hintText: qsTr("first name")
}
TextField {
id: lastName
horizontalAlignment: HorizontalAlignment.Center
hintText: qsTr("last name")
}
Button {
horizontalAlignment: HorizontalAlignment.Center
text: qsTr("Create")
onClicked: {
_app.addObject(firstName.text, lastName.text);
}
}
}
}
}