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. [SOLVED] Global progress bar and disabling main window
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] Global progress bar and disabling main window

Scheduled Pinned Locked Moved General and Desktop
5 Posts 4 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.
  • K Offline
    K Offline
    Kobid
    wrote on last edited by
    #1

    Hi,

    My desktop application has many operations which can take a while (for example file is downloading) and I want to disable all UI interactions until file is downloaded. For now I solved this by creating modal dialog with progress and status info. I'm wondering if Qt has some fancy solution for that? For example, in Android API you can easily create global progres like on this picture:
    !http://i.stack.imgur.com/Lf4IR.png(Demo)!

    As you can see, background is nicely shaded. Can I have similar effect with Qt?

    1 Reply Last reply
    0
    • mrdebugM Offline
      mrdebugM Offline
      mrdebug
      wrote on last edited by
      #2

      In my modest opinion there are many ways to solve this problem. For example I normally use a thread for download and a on top form with the progress bar.

      Need programmers to hire?
      www.labcsp.com
      www.denisgottardello.it
      GMT+1
      Skype: mrdebug

      1 Reply Last reply
      0
      • VinorcolaV Offline
        VinorcolaV Offline
        Vinorcola
        wrote on last edited by
        #3

        You have indeed a such class:
        http://qt-project.org/doc/qt-5.1/qtwidgets/qprogressdialog.html

        1 Reply Last reply
        0
        • N Offline
          N Offline
          NicuPopescu
          wrote on last edited by
          #4

          to get the same effect I think it would work:

          1. style sheets for widgets :disabled state
          2. before long operation:
            @foreach( QWidget *w, mainWindow )
            w->setEnabled( false );@
          1 Reply Last reply
          0
          • K Offline
            K Offline
            Kobid
            wrote on last edited by
            #5

            Thanks a lot! Problem solved

            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