10-21-2013 10:54 PM - edited 10-22-2013 12:59 AM
If I have main.qml and calculate some number in that and store in "Current.text"
How to show value of Current.text in another qml (for example secondpage.qml)
These two qml files in same project.
Thanks for your advices.
10-22-2013 12:30 AM
welcome to the forum
Now the approach i use for this problem is declaring a property in the root item of your application , this can be a navigationpane or something else.
Then you can assign the value to the declared property and then access it any where in the application , i.e. in all qml files !!
Let me know if you are not clear with this !!
10-22-2013 12:41 AM
Thanks for your advice.
For main.qml I used Navigation pane.
If you think of pre-script that generate when I selected create new project with Navigation pane.
It will generate 2 qml files. main and secondpage.qml right?
When I create fomular in main.qml and need to use result in secondpage.qml .. can I do that?
10-22-2013 12:51 AM
yes of cource you can do that let me show you :
property string buttonText
root.buttonText = "something"
// push second page here
This is an hand written code can have some syntax issues !!