When we create progress bar in PyQt5 its orientation is by default horizontal, but we can change it with the help of
setOrientation method. In order to get the information about the orientation of progress bar i.e it is horizontal or vertical
orientation method is used.
Syntax : bar.orientation()
Argument : It takes no argument.
Return : It will return Orientation object although when we print it, it will print 1 for horizontal orientation and 2 for vertical orientation.
Below is the implementation.
class 'PyQt5.QtCore.Qt.Orientation' 2
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course