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. Can't Interact with Main GUI while Brining up Dialog
Forum Updated to NodeBB v4.3 + New Features

Can't Interact with Main GUI while Brining up Dialog

Scheduled Pinned Locked Moved Unsolved General and Desktop
qt4qdialog
4 Posts 3 Posters 1.5k Views 3 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.
  • D Offline
    D Offline
    DougyDrumz
    wrote on last edited by
    #1

    I have a dialog that takes a long time to come up. I made it non-modal, so once it's up, I can interact with the rest of my GUI. However, while it's coming up I can't. Is there any way around that?

    Dougy Drumz

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      What makes that dialog creation so long ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • D Offline
        D Offline
        DougyDrumz
        wrote on last edited by
        #3

        It has to get info from several different hosts. So it has to ssh to each host and run several commands.

        Dougy Drumz

        A 1 Reply Last reply
        0
        • D DougyDrumz

          It has to get info from several different hosts. So it has to ssh to each host and run several commands.

          A Offline
          A Offline
          ambershark
          wrote on last edited by
          #4

          @DougyDrumz Open the dialog without this information. Then in a separate thread (so you don't lock things up) get the info you need and populate the dialog once the info is available.

          The way I would do that is just show a loading widget of some sort while it loads the info, then once loaded, show the real widgets on the dialog. You can use QStackedWidget to make this easy.

          Another way is don't use dialogs. Modern applications rarely use them any more, except for things like File->Open.

          My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

          1 Reply Last reply
          2

          • Login

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