PDA

View Full Version : QProgressBar: Start from mid.



pastispast
11th August 2010, 10:51
Hi All,

I have a QProgressBar with the range of -50 to +50,

I want to set the value as 10 and the chunk should start from the 0 (from the mid).

But chunk is starting from the minimum value (-50).

How can I start the orientation from mid?

Thanks...

Lykurg
11th August 2010, 11:44
You can't because this it not for what a progress bar is for. I am sorry, but you have to subclass and do the painting yourself.

pastispast
12th August 2010, 11:24
Thanks, Lykurg.

Actually I was using progress bar in custom button. and I have more things with it.

I have solved this one by taking 2 progress bar and using the "setInvertedAppearance" property.

Once again thanks for your response...:)