Qt 6.12 LTS is out! See what's new in the release
blog
QProgressDialog shows progress always in %
General and Desktop
3
Posts
3
Posters
3.4k
Views
1
Watching
-
Hi,
I don't like to see the progress in %. How to change this?
Up to now I didn't find something for override.Thanks
-
Unfortunately QProgressDialog does not provide a property for that, in contrary to a [[Doc:QProgressBar]].
-
I think (not tried) this is easy to solve with a simple hack like this:
@
QProgressBar* progressBar = theProgressDialog->findChild<QProgressBar*>();
if (progressBar) {
progressBar->setFormat("%v/%m"); //or whatever format your fancy
} else {
//something wend wrong. Perhaps QProgressDialog didn't use an internal QProgressBar after all?
}
@