11-12-2012 03:56 AM
I want to open new page in bb10, how I do it.
11-12-2012 04:29 AM - edited 11-12-2012 04:29 AM
You have two options if you want to use a NavigationPane, which is recommended:
1. Load it from the C++ code. To do so a good idea is to do something like the following in the function you would call to load another QML:
QmlDocument *qml = QmlDocument::create("asset:///anotherQML.qml");
qml->setContextProperty("appUi", this);
qml->setContextProperty("_navPane", m_navPane);
if (!qml->hasErrors()) {
Page *appPage = qml->createRootObject<Page>();
if (appPage) {
m_navPane->push(appPage);
}
}2. Load it directly from the QML:
// Navigation pane project template
import bb.cascades 1.0
NavigationPane {
id: navigationPane
Page {
// page with a picture thumbnail
Container {
Button {
id: testBtn
text: "Load QML"
onTriggered: {
navigationPane.push(asset:///anotherQML.qml);
}
}
}
}
}
11-12-2012 05:34 AM
how to open qml view from main qml ues qml call c++ blackberry 10
11-12-2012 05:46 AM