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. QProgressDialog won't block user inputs in MainWindow before it appears
Forum Updated to NodeBB v4.3 + New Features

QProgressDialog won't block user inputs in MainWindow before it appears

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 2.2k Views 1 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.
  • N Offline
    N Offline
    neveralull
    wrote on last edited by
    #1

    I love using the QProgressDialog as WindowModal to block user inputs in the MainWindow while the user command is being executed. But to avoid annoying the user with the QProgressDialog for short running commands, I set the minimumDuration to 3 seconds. So now the QProgressDialog window only appears after 3 seconds has elapsed. However, during that 3 seconds, user inputs are enabled on the MainWindow, which I don't want. I love the way the Window Modality prevents user inputs. The MainWindow looks the same, but the user just gets a short beep when he clicks in it. I'd like that to happen during the 3 seconds before the QProgressDialog appears, but it doesn't. The only other alternative I can think of is to disable the main window, but that redraws the whole window to look disabled. I don't want to do that. Can anybody think of a way to get the QProgressDialog to block user inputs in the Main Window and remain invisible? Or, alternatively, is there a way to block user inputs without bringing up a QDialog that is visible to the user?

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dbzhang800
      wrote on last edited by
      #2

      IMO, you can show another Model dialog(frameless and very small) during this time.

      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