[Qt-interest] my qprogressbar only updates itself the first time :(
Yifei Li
yifli at mtu.edu
Thu Nov 12 05:11:33 CET 2009
Woops, accidently hit 'Send mail'
statusBar()->addWidget(progressBar);
progressBar->setValue(0)
...
progressBar->setValue(1)
...
...
progressBar->setValue(2)
...
statusBar()->removeWidget(progressBar)
Using the above code, progress bar shows up and updates itself correctly for the first time I read a file, but it failed to work for subsequent files
However, if I add the progress bar to the status bar at the begining (instead of adding it to status bar before reading a file and then removing it afterwards), the problem is gone
Yifei
----- Original Message -----
From: "Yifei Li" <yifli at mtu.edu>
To: "qt-interest" <qt-interest at trolltech.com>
Sent: Wednesday, November 11, 2009 11:03:38 PM GMT -05:00 US/Canada Eastern
Subject: Re: [Qt-interest] my qprogressbar only updates itself the first time :(
To make it more clear, here's what I'm trying to do, once a file is selected :
statusBar()->addWidget(progressBar);
progressBar->setValue(0)
...
progressBar->setValue(0)
...
----- Original Message -----
From: "Yifei Li" <yifli at mtu.edu>
To: "qt-interest" <qt-interest at trolltech.com>
Sent: Wednesday, November 11, 2009 7:36:43 PM GMT -05:00 US/Canada Eastern
Subject: [Qt-interest] my qprogressbar only updates itself the first time :(
Hi all,
I have a qprogressbar to indicate the progress on reading a file.
The qprogressbar updates itself correctly when I first read a file ( no matter what file it is, qprogress bar works perfectly)
However, the progressbar is not updated at all when I read subsequent files.
This doesn't make any sense to me. Any ideas? Thanks
Yifei
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest
_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-interest
More information about the Qt-interest-old
mailing list