bunjee
8th January 2008, 16:08
Hey there,
One of my widget is emiting a "deleteMe" signal on the mouse release event.
I've come up to this to avoid the "do not delete an object in his event" Qt warning,
//================================================== ===========================
//================================================== ===========================
/* virtual */ void ZeContactWidget::mouseReleaseEvent(QMouseEvent * event)
{
QTimer::singleShot(1, this, SLOT(onEmitClick()));
}
but I'm not sure that the proper way to do it, even if not crashing :S.
Do I have to call deleteLater() to delete that widget ?
Thanks.
One of my widget is emiting a "deleteMe" signal on the mouse release event.
I've come up to this to avoid the "do not delete an object in his event" Qt warning,
//================================================== ===========================
//================================================== ===========================
/* virtual */ void ZeContactWidget::mouseReleaseEvent(QMouseEvent * event)
{
QTimer::singleShot(1, this, SLOT(onEmitClick()));
}
but I'm not sure that the proper way to do it, even if not crashing :S.
Do I have to call deleteLater() to delete that widget ?
Thanks.