PDA

View Full Version : Qt problem in postEvent,called from thread.



Raadush
23rd November 2012, 07:57
I have dynamic library, developed for MAC OS x, which is called form other application, non-qt. I need there show QUI Qt window. On library attached function, i initialize QApplication object in special thread and run 'exec'. On function, which is called in different thread, I use 'moveToThread' function to move object into the qApplication thread, Next, I call postEvent .. to show gui .. Everything is OK, but if I call this on second attempt in the same thread, postEvent is not send to the my object.
It seems that message loop of QApplication does not work, but why.
Does anybody have experience how to solve it, or what i do bad ? Using Qt 4.8.3

amleto
23rd November 2012, 10:32
Things would be much easier with code... read my sig.

If you are saying that first time you call postEvent(..) works, but second time doesn't, then you should probably look at the code between the first and second calls.