What is the proper way to set QProgressBar to update from the logic layer? [Solved]
General and Desktop
5
Posts
3
Posters
1.5k
Views
1
Watching
-
@
forever { // or any other loop you have
// do your calculations
qProgressBar->setValue(currentVal);
qApp->processEvents();
}
@"::setValue()":http://qt-project.org/doc/qt-4.8/qprogressbar.html#value-prop
Alternatively, you can emit some signal from your logic, and connect to it in your GUI.
-
Yes. Now you mention it, I can see it might not be exactly what you want.
Yes and no. You have to emit the signal to update the progress bar, but you don't have to do it every time if you don't want to.