[PyKDE] GUI not updateing ?

Ismail Donmez ismail at pardus.org.tr
Sun Sep 24 15:16:42 BST 2006


24 Eyl 2006 Paz 17:05 tarihinde şunları yazmıştınız:
> Ismail Donmez wrote:
> >>> Or use events to communicate the progress. I haven't had the
> >>> experience yet, but many qt and kde developers say that
> >>> processEvents is evil and should be avoided, it might have
> >>> mysterious side effects.
> >>
> >> Which ones?
> >
> > If you used deleteLater() for an QObject, processEvents() might
> > delete that object which might result in a crash.
>
> And? Why should you use an object on which you called deleteLater()? The
> object will still be destroyed as soon as the code gets back to the event
> loop. processEvents() is in fact just a nested event loop.

You just do fatherObject->deleteLater() and its gets deleted as soon as child 
objects are deleted. I saw many cases where processEvents() would lead to 
crashes in these cases, and its use under kdelibs are not recommended either.

/ismail
-- 
They that can give up essential liberty to obtain a little temporary safety 
deserve neither liberty nor safety.
-- Benjamin Franklin




More information about the PyQt mailing list