PDA

View Full Version : adding subclassed items to a QGraphicsScene



liqxpil
27th October 2010, 11:39
hi all,

I have created a subclass from QGraphicsItem, now I'm trying to add instances of this subclass to a QGraphicsScene to be displayed on it. however using the AddItem function in the QGraphicsScene does not work for subclassed items.. any ideas?

wysota
27th October 2010, 11:49
Using addItem works for subclassed items.

liqxpil
27th October 2010, 11:53
ops sorry it was a pointer issue
thanks

Leszek
27th October 2010, 11:54
It works for me very well. Maybe, shows some piece of code...