09-09-2012 08:51 AM
Solved! Go to Solution.
09-09-2012 11:19 AM
I found simple solution!
// File: main.qml
NavigationPane {
id: navigationPane
Page {
Container {
background: Color.White
Label { text: "Pre-pushed Page" }
}
actions: [
ActionItem {
title: "Push()"
ActionBar.placement: ActionBarPlacement.OnBar
onTriggered: {
navigationPane.deprecatedPushQmlByString("page.qml ");
}
}
]
}
}
// File: page.qml
Page {
Container {
background: Color.White
Label { text: "Dynamically pushed Page" }
}
actions: [
ActionItem {
title: "Push()"
ActionBar.placement: ActionBarPlacement.OnBar
onTriggered: {
navigationPane.deprecatedPushQmlByString("page.qml ");
}
},
ActionItem {
title: "Pop()"
ActionBar.placement: ActionBarPlacement.OnBar
onTriggered: {
navigationPane.popAndDelete()
}
}
]
}
Its work fine if I use new project!!
But in my project it's does not work! Always I see error in page.qml: "ReferenceError: Can't find variable: navigationPane"
09-09-2012 11:22 AM
I found solution!
If you have TabbedPane and included NavigationPane and deprecatedPushQmlByString already used, you can't push next screens!!!!! I think it can be fixed, because its bug.
09-09-2012 11:52 AM
simple example for implementing
// main.qml
TabbedPane {
Tab {
id: mainTab
MainCustomQMLPage {
}
}
Tab {
id: secontTab
SecondCustomQMLPage {
}
}
}
// MainCustomQMLPage.qml
NavigationPane {
id: nav
Page {
Button {
text: "Click me"
onClicked: {
nav.deprecatedPushQmlByString("MainCustomQMLPage.q ml")
}
}
}
}
09-09-2012 11:53 AM
09-09-2012 12:25 PM
Hi,
I can't get your 2nd example to work for me.
I created a new MainCustomQMLPage.qml file that is a NavPane.
In the main.qml file, I put in the MainCustomQMLPage in the first mainTab, but I get the following error:
Empty property assignment
MainCustomQMLPage {
^)
QmlDocument:createRootNode document is not loaded or has errors, can't create root
Any ideas?