Results 1 to 2 of 2

Thread: base questio on qprogredialog

  1. #1
    Join Date
    Jan 2006
    Posts
    976
    Thanks
    53
    Qt products
    Qt3
    Platforms
    Windows

    Default base questio on qprogredialog

    hi I have 2 progress bar:
    Qt Code:
    1. b1.setProgress (0, n);
    2. b2.setProgress(0,n*2)
    3. for (int i=0; i< n; i++) {
    4. b1.setProgress(i);
    5. b2.setProgress(i)
    6. }
    To copy to clipboard, switch view to plain text mode 
    at the end I think b1 bar must be at its end! and b2 at its half. is it right? is it work so?
    thanks.... (I need to do that)...
    Regards

  2. #2
    Join Date
    Jan 2006
    Location
    Alingsås, Sweden
    Posts
    437
    Thanks
    3
    Thanked 39 Times in 39 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: base questio on qprogredialog

    Yes, but you will not see any updates while they are progressing as the event loop is not run within the for-loop. Perhaps you could try using a timer, or calling the event loop by using the appropriate method from QApplication.

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.