Subclassing QGraphicsItemGroup

Posted by onurozcelik on Stack Overflow See other posts from Stack Overflow or by onurozcelik
Published on 2010-05-03T06:46:27Z Indexed on 2010/05/03 6:48 UTC
Read the original article Hit count: 323

Filed under:
|
|

Hi everyone

I have system that has classes derived from QGraphicsWidget. I manage derived class objects in layouts on QGraphicsScene. Now I need a compound item that contain two or more QGraphicsWidget in it and also I need to put that item inside my layout. So I choose QGraphicsItemGroup and write I class like this.

class CompositeItem : public QGraphicsItemGroup,public QGraphicsLayoutItem
{   
   ...  
};

I only implemented sizeHint function again. When add CompositeItem instance to layout it does not shown. What may cause this? Where I made wrong?

© Stack Overflow or respective owner

Related posts about qt

Related posts about qgraphicsview