Maybe you can do the same with just one scene. You can set individual graphic items to be moveable or static by setting the correct flags to each item. For example: QGraphicsItem::ItemIsMovable and QGraphicsItem::ItemIsSelectable
Maybe you can do the same with just one scene. You can set individual graphic items to be moveable or static by setting the correct flags to each item. For example: QGraphicsItem::ItemIsMovable and QGraphicsItem::ItemIsSelectable
Yes, I'm thinking about this concept too, but I'm trying solution with two scenes at first. Solution with two scenes would be more effective for me and easiest in further development - layer management and others, I guess...
the whole concept of my game is something like river raid game on C64. On ny first scene background: land, river, tanks, and other movable stuff, second one of course with firing plane. There must be some way to do this...
But... As far as I know QGraphicsView can only handle one scene at a time:
void QGraphicsView::setScene ( QGraphicsScene * scene ) and not a collection of scenes
Also, a layer can be described as a group of graphic items in a scene thus you can implement it with QGraphicsItemGroup.
You can have a first group in the lowest Z containing land and rivers. Then another group with tanks in Z+1, then your plane in Z+2... And so with all the content.
Carlos.
Wojtek_SZ (11th August 2011)
After some thought... you have right there isn't such possibility to put more than one scene in to one graphicsView. I decided to change my plans. I gonna use only one scene with your group concept -such layer management seems to be similar to photoshop.
Thanks for help![]()
Bookmarks