PyQt5 – Set fixed length for width/height of Status Bar
When window is resized status bar also get resized although we can set a fix size of status bar by using
setFixedSize method with object of status bar. In this article we will see how we can only fix the length of wither width or height i.e other side would be variable.
In order to fix length of width we use
setFixedWidth with object of status bar and to fix length of height we use
setFixedHeight with object of status bar.
Syntax :self.statusBar().setFixedHeight(height) self.statusBar().setFixedWidth(width)
Argument : Both methods take integer as argument.
Action performed :
setFixedHeightfix the height of status bar.
setFixedWidthfix the width of status bar.
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