deleteLater() post an event into the object thread's event loop using QCoreApplication:ostEvent(). That method is thread safe.
Cheers,
_
deleteLater() post an event into the object thread's event loop using QCoreApplication:ostEvent(). That method is thread safe.
Cheers,
_
oh, has anything changed or am i interpreting the documentation wrong? It says:
the thread from which deleteLater() was called (API thread) is not the same as thread in which QObject was created (GUI thread). So will deleteLater still post to the GUI thread?...for the object to be deleted, the control must return to the event loop from which deleteLater() was called.
Maybe that is just an unfortunate phrasing, wanting to say that the thread executing the object's event processing must return to event processing before anything happens.
I am pretty sure that QCoreApplication:ostEvent() puts the event in the target object's event loop, anything else wouldn't make sense.
A quick check of the code confirms that :-)
Cheers,
_
ustulation (24th November 2013)
Bookmarks