PDA

View Full Version : Can QGraphicsItem's parent item be from another scene?



cresta
24th September 2012, 17:37
Hi,
there are two QGraphicsScene's in my application. Is it ok to use QGraphicsItem's from one scene as parents for QGraphicsItem's from another scene? I am not sure if that is correct.

Thanks in advance!

wysota
24th September 2012, 18:09
No, you can't do that.

cresta
25th September 2012, 17:51
Thank you very much! Could you please point out corresponding notes in the Qt documentation?

wysota
25th September 2012, 21:51
Could you please point out corresponding notes in the Qt documentation?

No, I can't. You know where to look, you can try to find it yourself. For instance there is a statement that a child item is always painted on top of its parent. There is another statement somewhere stating that an event ignored by the item is forwarded not to its parent as it is with widgets but rather to an item "under" the original item. There is also a set of statements describing that transforming an item has effect on all its children.