Results 1 to 14 of 14

Thread: Busy Indicator using QProgressDialog??

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    8
    Thanked 133 Times in 128 Posts

    Default Re: Busy Indicator using QProgressDialog??

    Quote Originally Posted by Qiieha View Post
    why so difficult???
    use
    Qt Code:
    1. QProgressDialog progress(this);
    2. progress.setWindowModality(Qt::WindowModal);
    3. progress.setLabelText("working...");
    4. progress.setCancelButton(0);
    5. progress.setRange(0,0);
    6. progress.setMinimumDuration(0);
    7. progress.show();
    8. //do what u want...
    9. progress.cancel();
    To copy to clipboard, switch view to plain text mode 
    Did you noticed that this thread is 2 years old and the OP got the answer as well.

  2. #2
    Join Date
    Apr 2011
    Posts
    195
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    49
    Thanked 4 Times in 4 Posts

    Default Re: Busy Indicator using QProgressDialog??

    I know, but his solution is intricate, and lots of people google for "QProgressDialog busy indicator" and hit on this thread.
    So I think it's useful, if there is another working solution, isn't it?

  3. #3
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    8
    Thanked 133 Times in 128 Posts

    Default Re: Busy Indicator using QProgressDialog??

    well, if you try your code
    1. progress.show();
    2. //do what u want...
    3. progress.cancel();

      You will not see the animation in the progress dialog because the event loop would be blocked util your "//do what u want" is finished.

  4. #4
    Join Date
    Apr 2011
    Posts
    195
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    49
    Thanked 4 Times in 4 Posts

    Default Re: Busy Indicator using QProgressDialog??

    no, I use my code in a couple of programs and it works.

Similar Threads

  1. busy progress bar without thread ?
    By npc in forum Newbie
    Replies: 34
    Last Post: 23rd July 2009, 09:29
  2. Replies: 2
    Last Post: 22nd January 2008, 15:15

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.