How to set QProgressBar widget in vertically from Qt Designer?
-
Hi, experts,
I am a new member of this forum :-).
I encountered a question as below when I want to place a QProgressBar in vertically from Qt Designer:
I can't set the property orientation of a QProgressBar widget to Vertical. I selected the property orientation to Veritcal from a drop-down list:
It will return to default value( here is Horizontal ) when I change other attributes.
Now, I tried to edit the property orientation from generated file *.ui, yes, it works.
But, it caused another problem:
The QProgressBar widget can't show its current value!
As you can see, only the horizontal QProgressBar widget shows its current value.
Here are my questions:- If it's okay set property orientation of QProgressBar widget to Vertical from Qt Designer? If yes, how to do?
- Why the QProgressBar's value disappeared when its property orientation set to Vertical? Is this problem caused by my incorrect operation steps?
Platform:
MS Windows 10
Software version:
Python: v3.10.8
PySide6: v6.5.0
Qt Designer: v6.5.0
Thanks in advance for your help :-).
-
A progress bar always displays the correct value, regardless of its orientation.
The default value is 24. I have no idea why and no idea why it disappears for you, if the orientation changes. However, if you usesetValue(x)
, x will be represented correctly. -
@BrantFF said in How to set QProgressBar widget in vertically from Qt Designer?:
It will return to default value( here is Horizontal ) when I change other attributes.
Give an example of exactly one further change which causes Vertical to get replaced by Horizontal. And if it really does that the version of Qt Creator you are using. OIC,
Qt Designer: v6.5.0
. Give the change example (e.g. does it happen if you unchecktextVisible
? does it change if you pick some other widget and change one of its attributes, so that you are saying any change at all causes reversion?) and ask someone with that Designer version if it happens to them.