Results 1 to 2 of 2

Thread: Shutdown needed on the main thread

  1. #1
    Join Date
    May 2013
    Posts
    321
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    9
    Thanked 8 Times in 8 Posts

    Exclamation Shutdown needed on the main thread

    Hi,
    Is it possible to switch to the main thread on the "about to quit" signal to shutdown what it needs to be shutdown on the main thread ?
    I have a dirextx 11 rendering code and the shutdown needs to be on the main thread.
    How solve this issue correctly ?
    Thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts

    Default Re: Shutdown needed on the main thread

    If you connect to an object that runs in the main thread, then the slot will be called in the context of the main thread independet of which thread executed the emit.

    This is called a Queued Connection, the default behavior of the Auto Connection type used by connect() if not specifed otherwise.

    Cheers,
    _

Similar Threads

  1. Replies: 51
    Last Post: 21st April 2015, 13:12
  2. Replies: 1
    Last Post: 28th March 2012, 19:58
  3. Replies: 5
    Last Post: 22nd February 2011, 22:21
  4. Replies: 9
    Last Post: 28th November 2009, 21:31
  5. Replies: 16
    Last Post: 7th October 2009, 09:17

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
  •  
Qt is a trademark of The Qt Company.