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
QtWS25 Last Chance

Can't Interact with Main GUI while Brining up Dialog

Scheduled Pinned Locked Moved Unsolved General and Desktop
qt4qdialog
4 Posts 3 Posters 1.4k Views
  • 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 16 Mar 2017, 18:40 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
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 16 Mar 2017, 20:46 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 17 Mar 2017, 00:04 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 17 Mar 2017, 02:42
        0
        • D DougyDrumz
          17 Mar 2017, 00:04

          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 17 Mar 2017, 02:42 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

          4/4

          17 Mar 2017, 02:42

          • Login

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