[Qt] Qt deffered deletion (QObject_deleteLater())

zeljko zeljko at holobit.net
Wed Jan 14 08:09:53 CET 2009

On Wednesday 14 January 2009 00:04, Paul Ishenin wrote:
> zeljko wrote:
> > So my question would be (since I don't want to break qt-4.3 users),
> > should I ifdef it like USE_QT_44 OR QT_NO_DEFFERED_DELETION ?
> If you dont remember we had some problems with object destroying inside
> their events. Because of that we are using postponed object destroying.
> If your new code will work with this feel free to commit it.

Yes, I remember that, that's because I was sceptic when started with changes 
about deffered deletion.
1.Only two objects have problems with postponed destroying TQtTimer & TQtMenu 
(TPopupMenu exactly).
Those objects have problems cause inside their events we call LCL directly.
2.Another one which could be problematic (theoreticaly) is TQtComboBox with 
call to IntfGetItems inside it's event filter. But at this moment my tests 
say that it does not raise any problem.

Now I'm sure that this is the right way, because it really works better and 
faster (apps & ide).
I'll commit it with USE_QT_44 ifdef.


More information about the Qt mailing list