That's the answer I was looking for. It wasn't clear to me, because you can setValue() with both QProgressBar and QProgressDialog.However, you should use QProgressDialog::setValue()
Thanks again.
That's the answer I was looking for. It wasn't clear to me, because you can setValue() with both QProgressBar and QProgressDialog.However, you should use QProgressDialog::setValue()
Thanks again.
But I get a QProgressDialog without a bar.
Let me rephrase the question: what is the minimum I have to do, given I have a working QProgressDialog, to get a bar that shows nothing: no percentage, nothing, that just moves.
Set both minimum and maximum values to 0.
Still no bar.
I have a working QProgressDialog. It shows percentages. The default. Which I don't want.
So then I add in the application constructor:
Qt Code:
progress->setFormat(" "); progress->setMaximum(0); progress->setMinimum(0); ... progressDialog->setBar(progress);To copy to clipboard, switch view to plain text mode
and the result is a QProgressDialog without a bar at all.
But why do you insist on placing your own bar on the dialog?
This is what I get using the following code:
Qt Code:
#include <QProgressDialog> #include <QApplication> int main(int argc, char **argv){ QProgressDialog dlg; dlg.setRange(0,0); dlg.exec(); return 0; }To copy to clipboard, switch view to plain text mode
hvw59601,
I ran into the same problem as yours. The problem is you have to pass the pointer to QProgressDialog to the constructor of QProgressBar.
Like this:
Qt Code:
QProgressDialog dialog; progress->setFormat(" "); progress->setMaximum(0); progress->setMinimum(0); dialog.setBar(progress);To copy to clipboard, switch view to plain text mode
I hope that helps.
Bookmarks