Hi,
how can I use custom text on a QProgressBar?
Hi,
how can I use custom text on a QProgressBar?
Looks to me like you will have to derive your own widget from QProgressBar and override paintEvent() so it will draw your text. Wouldn't it be easier just to put a QLabel next to the standard progress bar and connect to the progress bar's valueChanged() signal so you can change the text on the label?
To write a custom text into a progress bar you can use the format string. If you write in some text instead of %p% for percentage the text will be displayed.
see format() or setFormat().
Bookmarks