[Qt-interest] Deleting a QGraphicsTextItem object in touch event handler crashes app

Bruce Cran bruce at cran.org.uk
Sat Feb 27 08:32:46 CET 2010


Hi,

I'm new to Qt so I'm not sure if what I'm trying to do should work or not. I 
have a QGraphicsScene with a custom QGraphicsItem. When I move the mouse over 
it, I want some text to be displayed somewhere else so I've overridden the 
hover enter and hover leave events and added text to the scene when entered 
and removed it when the mouse leaves my item.  However I've found that when I 
delete the QGraphicsTextItem object (as opposed to just removing it from the 
scene) I get a segfault in QGraphicsItem::isPanel.  I'm wondering if I should 
be inheriting from QGraphicsWidget and using signals/slots instead?

-- 
Bruce Cran



More information about the Qt-interest-old mailing list