Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Modeless dialog
Qt 6.11 is out! See what's new in the release blog

Modeless dialog

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 645 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Buller
    wrote on last edited by
    #1

    If I have understood the docs correctly a modeless dialog has its own event loop. Does that mean that it is effectively running in a separate thread? If so, should signals be connected as Qt::QueuedConnection?

    Pl45m4P 1 Reply Last reply
    0
    • B Buller

      If I have understood the docs correctly a modeless dialog has its own event loop. Does that mean that it is effectively running in a separate thread? If so, should signals be connected as Qt::QueuedConnection?

      Pl45m4P Offline
      Pl45m4P Offline
      Pl45m4
      wrote on last edited by Pl45m4
      #2

      @Buller said in Modeless dialog:

      Does that mean that it is effectively running in a separate thread?

      No.
      Event loop != thread
      The whole Qt GUI is single threaded only and Qt GUI elements must only be accessed from the "main" GUI thread... the thread of your program where the QApplication was created.

      If so, should signals be connected as Qt::QueuedConnection?

      No, you can omit the fifth argument anyway since Qt will pick the right one for you (between Qt::DirectConnection and Qt::QueuedConnection) in most cases.


      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      1 Reply Last reply
      4
      • B Offline
        B Offline
        Buller
        wrote on last edited by
        #3

        Understood. Thanks.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved