How can let Qt Graphics View Framework support custom layers

Posted by jnblue on Stack Overflow See other posts from Stack Overflow or by jnblue
Published on 2010-06-13T03:57:44Z Indexed on 2010/06/13 4:02 UTC
Read the original article Hit count: 492

Filed under:
|

Qt's graphics view frameworks is very powerful, but I have not found a way to support custom layers. In Qt, there is a QGraphicsScene::ItemLayer,but QGraphicsScene renders all items are in this layer. I want manage the items with several layers, Just like Illustrator and CorelDraw. all the item only in the current layer will receive the event, be selected or get the key focus etc.. Other layers(not current layer) will not receive all scene event. The most reasons of using layers is I could catalogue a large number of items more clearly.And without needing transfer events to all the layers' items ,I think the graphics frameworks will be more efficient. The last question, does QGraphicsView support rendering server stacked graphics scenes at the same time? If support, I think the "custom layers" can be solved in this way. Thanks very much!

© Stack Overflow or respective owner

Related posts about qt

Related posts about qgraphicsview