Results 1 to 2 of 2

Thread: Qt problem in postEvent,called from thread.

  1. #1
    Join Date
    Apr 2012
    Posts
    43
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default Qt problem in postEvent,called from thread.

    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

  2. #2
    Join Date
    Sep 2011
    Posts
    1,241
    Thanks
    3
    Thanked 127 Times in 126 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qt problem in postEvent,called from thread.

    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.
    If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

Similar Threads

  1. slot in worker thread is not called
    By phenoboy in forum Qt Programming
    Replies: 1
    Last Post: 2nd June 2012, 19:45
  2. Slot not getting called, Qt::ConnectionType, Thread
    By StarShaper in forum Qt Programming
    Replies: 3
    Last Post: 7th February 2012, 14:04
  3. postEvent & Thread problems
    By gianpatt in forum Qt Programming
    Replies: 4
    Last Post: 21st March 2008, 14:19
  4. postEvent thread problem
    By jhamers in forum Qt Programming
    Replies: 1
    Last Post: 5th March 2008, 10:36
  5. Replies: 4
    Last Post: 26th July 2006, 07:06

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.