Multiple declarativeviews
-
Hi,
i'm (at the moment) using a GridView for displaying and arranging my abstractitemmodel-subclass.
The GridViews delegate then is used to display PathViews as items of this GridView. This just works as intended.
As I proceed now it would be nice to replace the GridView and place it's Items on a Circle. I thought about using another PathView for that purpose.
The UI should then work like this: On startup there should be like 5 items (depending on the underlying structure) placed on a circle in the center of the application. Clicking one of these items should then display the children of the clicked item (on a nice circle again), moving the rest of the items to a corner on the screen but still having them displayed somewhere. Just changing the rootitem of my model would not help i guess.My Idea now was to put every circle in its own declarativeview, managing and placing them in c++ and not qml anymore.
My Question now is: Is there a nicer way to place my items in qml without having multiple declarativeviews or (if it has to be that way) is there a quick way to create these views from inside qml like in the corresponding delegate or something like that?Looking forward to any help!
-
Have you seen the photoviewer demo (in demos/declarative/photoviewer)? It uses the following techniques, which should be relevant to what you are trying to accomplish:
- multiple layers of Views within delegates
- packages, which allow smooth transitions of items from one view to another
For example, you might have an empty PathView of a single point sitting in the corner, which gets filled with the contents of the original circle PathView when transitioning to the next circle PathView. Packages can sometimes be hard to get started with, so I'd suggest also looking at the simple example in examples/declarative/modelviews/package.