Łukasz Przeniosło
Łukasz Przeniosło

Reputation: 2949

QProgressBar text format as time

I was wondering either there is any easy way of displaying current and maximum value of QProgressBar as seconds in HH:mm:ss format. Currently my format is %v/%m, is there a way to show it as time?

Upvotes: 1

Views: 449

Answers (1)

gengisdave
gengisdave

Reputation: 2050

You can use QProgressBar::setFormat(QString); you can use any text you want, just convert your time to QString.

http://doc.qt.io/qt-5/qprogressbar.html#format-prop

Upvotes: 1

Related Questions