PDA

View Full Version : Multiple page menu



Borghal
19th March 2013, 20:11
I need to make a menu that spans multiple pages and has a tree structure more than two levels deep, how to best approach this?
I'm thinking make a qml file for each menu page - but how do I link them together? How do I pass information from one page to another and possibly set transitions?


I've searched for quite some time now but aside from the odd forum question I haven't really found anything that covers this topic well...

Santosh Reddy
21st March 2013, 09:42
You sould be able to use QMenu.

Why do you think QMenu will not work for your case.

Borghal
21st March 2013, 18:58
As I mentioned, the menu spans multiple pages - literally. I'm making a game and I want the menu to look like game menus usually do (I hope you get my meaning). Anyway, I seem to have solved the initial HOW - by using Loader and making buttons of the menu switch to other pages.

However, as I haven't found a decent tutorial, the docu doesn't make for good study material and Qt Quick in general is not a largely discussed topic, I would still welcome any input or links to relevant information aside from official documentation.

One of my menu pages consists of a few custom created buttons, a background image and two images (jpg, a little less than 1MB) as buttons via mousearea. What bugs me is that it takes about a second to switch to said menu screen for the first time after runnign the app. Why is that? Surely loading two images isn't that taxing? If so, how to solve this?

Also - have not yet resolved another question I had in the OP. How to pass information (by that I mean any variable, nothing specific) from one menu page to the other? I suppose that has to be handled in C++ and not QML, right?

*sigh* I really need a guide of sorts on how to work with Quick PROPERLY. I can mostly figure stuff out myself, but being unsure whether it's a good way to do it irks me.