Sending commands to another QML when mousarea is clicked
-
@Alicemirror, Did you prepare a wiki with available elements documentation, and the steps to include Qt-Complex framework in to applications? And few samples will also help.
I guess if you have good documentation, it will become easy for people to try it out.
-
@Vijay, I am doing so. This is the Beta 1.0 today I release the 1.0 rc. This complete version includes the dynamic gemonmetry management for multiple devices. The documentation is on for some pieces and other will be updated in very few time. I have already started to write a first wiki page "here":http://developer.qt.nokia.com/wiki/category:Tools::QtComplex. This page incldes the link to the full documentation on the project wiki. All will be updated shortly.
-
[quote author="Vijay Bhaska Reddy" date="1310999670"]It looks like a perfect duplicate of "Creating a status QML for my virtual pet game":http://developer.qt.nokia.com/forums/viewthread/7866/
[/quote]I deleted the duplicated thread.
-
what if i join all the items in my status qml to my home qml,
-
did not get you .. do you mean creating an alias property in your home.qml for all the status properties in yoru status.qml??
Can you elaborate...
-
i will remove the status qml, and i will create texts in my home qml that will show the status of my pet which is hunger and had a default value of 50.
just like what i said on my first post, if click the feed mousearea it will show my feed qml that shows the dog eating his food. when i go back to my home qml, the hunger status of my pet will increase to 5, how can i do that. -
@Vijay Bhaska Reddy youre righ, when i load another qml using loader, the items on my qml are reset to its original value, how can i fix that?
Is there any other way i can view other qml using mousearea without resetting my qml?
-
If you use Loader, it will always reset. Try other approaches and post code if you face any problem.
But one thing for sure you need to store status / store in global object.
Try out storing it in C++ side, expose few properties of a QObject derived class and updated them with your score/status in your QML side.
When you call status.qml page, read these properties and display them. This seems like a reasonable solution to me.
-
Also, another thought, depending on the structure of your app's QML and how many elements you have, and so on, you could possibly forego the Loader altogether and create all of your elements at runtime. Then you could set the opacity or visible properties to show or hide individual elements as needed. That way you could still maintain bindings between different elements of your application.
-
After clicking mousearea to load another qml, i will make the changed items properties i dont want to reset? OK ill try this, Thanks, hope this will work