Results 1 to 16 of 16

Thread: Adding a Progress bar

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2009
    Posts
    143
    Thanks
    8

    Post Adding a Progress bar

    Hi

    I have built a app that needs about 25 seconds to complete the execution(it needs to read from a device)

    When its executing, my app window just goes white.

    I want to add a progress bar to indicate how many seconds are left before it completes executing.

    I have added the progess bar in the ui design, but i have no idea as tohow to call it in my function and display % left befor completion.

    i have used this only.

    ui->progressBar->reset();
    ui->progressBar->setRange(0,100);
    ui->progressBar->setValue(50);

    I have added the last command, in the function that needs 25 seconds, but as the app freezes, the increment is not shown.


    I have seen the documentation, but it doesnt actually help me as to how my progress bar should look like. i am new to Qt, so i am hoping someone can help.

    I need a progress bar, that keeps increasing from 0% to 5% to 10% and so on till 100 is reached and in 25 seconds. A constant moving bar.

    When the control goes inside the function, all the ui commands in there arent shown in realtime. i.e. the execution is not shown as the app has only a white screen.

    can anybody help?

    thanks
    Last edited by srohit24; 27th May 2009 at 08:29.

Similar Threads

  1. QtItemDelegate for progress bars
    By maxpayne in forum Qt Programming
    Replies: 2
    Last Post: 19th November 2008, 13:26
  2. Concurrent progress reporting
    By chezifresh in forum Qt Programming
    Replies: 1
    Last Post: 30th June 2008, 08:47
  3. Adding JavaScript Obj to QWebView issues
    By bpetty in forum Newbie
    Replies: 2
    Last Post: 13th May 2008, 20:44
  4. Replies: 4
    Last Post: 11th March 2008, 11:44
  5. Adding buttons on the tab part of a tabwidget
    By forrestfsu in forum Qt Programming
    Replies: 2
    Last Post: 20th December 2006, 17:52

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.