Results 1 to 6 of 6

Thread: How to use a QProgressbar

  1. #1
    Join Date
    May 2011
    Posts
    120
    Thanks
    9
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default How to use a QProgressbar

    Hi
    i am using a progressbar but it is not getting start.
    Can someone provide some example code in which progressbar will active untill timer not stop.

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: How to use a QProgressbar

    i am using a progressbar but it is not getting start.
    Post you code.

    Are you sure you don't need QProgressDialog?
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    May 2011
    Posts
    120
    Thanks
    9
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: How to use a QProgressbar

    Qt Code:
    1. progress = new QProgressBarDialoge(this);
    2. progress.setvalue(100);
    3. progress.setBar(p);
    4. progress.show();
    To copy to clipboard, switch view to plain text mode 


    but progresbar is not indicating any progress.
    Last edited by high_flyer; 16th March 2012 at 11:51. Reason: code tags

  4. #4
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: How to use a QProgressbar

    but progresbar is not indicating any progress.
    Why do you think it should?
    Where in your code do you update the progress?

    Please answer my question from the previous post.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  5. #5
    Join Date
    May 2011
    Posts
    120
    Thanks
    9
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default Re: How to use a QProgressbar

    in slot connected to timer i am updating progressbar.
    Can u provide some example code. I am not getting how to do it.

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to use a QProgressbar

    This code will not compile. Please post real code.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Using QProgressBar
    By gutiory in forum Qt Programming
    Replies: 6
    Last Post: 5th May 2010, 06:59
  2. QStatusBar and QProgressBar
    By croscato in forum Qt Programming
    Replies: 5
    Last Post: 30th July 2009, 18:16
  3. QProgressBar in a new window
    By tommy in forum Qt Programming
    Replies: 2
    Last Post: 13th March 2009, 17:24
  4. QProgressBar + Mac OS X
    By THRESHE in forum Qt Programming
    Replies: 5
    Last Post: 14th December 2007, 13:41
  5. QProgressBar & 200%
    By Dmitry in forum Qt Programming
    Replies: 2
    Last Post: 20th January 2006, 11:33

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.