Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 7

Qt-interest Archive, March 2007
Re: Experiencing Problem with QApplication::postEvent and QObject::customEvent (or related)


Message 1 in thread

Ralf Jänike wrote:
> -everytime the customEvent handler thread id is different from the main 
> thread id the dialog thread hangs itselfes

An event should be always handled in the main thread. It seems you're 
running the event loop on multiple threads. AFAIK the event loop is 
not reentrant in Qt3.3.x (I don't know about Qt4.x.x, but I would 
imagine the limitation there would be the same). Make sure you never 
call qApp->processEvents() or 
QApplication::eventLoop()->processEvents() from any other thread then 
the main thread.

Martin.

--
 [ signature omitted ]