[Qt-interest] Deletion of QGraphicsItem subclass
Ulrich Geilmann
ugeilmann at googlemail.com
Fri Dec 5 14:33:16 CET 2008
Hi.
I have got a problem with the deletion of instances of a subclass of
QGraphicsItem i wrote. Everytime the destructor of the class (and
therefore the destructor of QGraphicsItem) is called, the program crashes.
The class does not do anything so far.
I get the following backtrace:
#0 0x00f338fb in QMap<QGraphicsItem const*, QMap<int, QVariant>
>::remove ()
#1 0x00f2aaf1 in QGraphicsItem::~QGraphicsItem ()
#2 0x0001e756 in AudioPlayer::PlayerUI::~PlayerUI (this=0x22076510)
#3 0x00f457b9 in QGraphicsScene::clear ()
#4 0x00f45f05 in QGraphicsScene::~QGraphicsScene ()
#5 0x00020b4e in AudioPlayer::Player::~Player (this=0x35d20)
#6 0x00008b37 in __tcf_1 ()
#7 0x94d92fdc in __cxa_finalize ()
#8 0x94d92ed0 in exit ()
#9 0x00007343 in _start ()
#10 0x00007269 in start ()
PlayerUI is the subclass of QGraphicsItem, Player is a QGraphicsScene.
The weird thing in my opinion is: When i construct and then directly
delete a PlayerUI instance in the contructor of Player, the error does
not occur. But the objects of PlayerUI are not connected in any way.
I hope anyone has an idea...
Regards,
Ulrich
More information about the Qt-interest-old
mailing list