When we create a status bar, by default, the status bar size is resizable. Although we can use
setMinimumSize() method with status bar to set the minimum size of the status bar but what if we want to set minimum length for width or height only.
In order to do, so we use
setMinimumWidth() method with status bar to set minimum width and
setMinimumHeight() method with status bar to set minimum height, when we use these method other length will be variable i.e there will be no minimum length to it, it can shrinks as much it can.
Syntax :self.statusBar().setMinimumWidth(width) self.statusBar().setMinimumHeight(height)
Both take integer as argument.
Action performed :
setMinimumWidth()sets the minimum width.
setMinimumHeight()sets the minimum height.
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.
- PyQt5 - Visibility status of Status Bar
- PyQt5 - Set fixed length for width/height of Status Bar
- PyQt5 – Set minimum size of Status Bar
- PyQt5 – Set status bar message in window
- PyQt5 – Set color to a status bar
- PyQt5 - Set tool tip duration to Status bar
- PyQt5 - Set tool tip to Status Bar
- PyQt5 – Set skin to Status Bar
- PyQt5 - Set maximum size of status bar
- PyQt5 – Add border to status bar
- PyQt5 – Create dashed border of status bar
- PyQt5 – Setting and accessing description of a Status Bar
- Python PyQt5 – How to change font and size of Status Bar Message
- PyQt5 – Setting and accessing name of a Status Bar
- PyQt5 – Setting and accessing WHATS THIS help text for Status Bar
- PyQt5 - Access tool tip data of Status Bar
- PyQt5 - Access tool tip duration of Status Bar
- PyQt5 - Make Status Bar invisible
- PyQt5 - Access the size of Status Bar
- PyQt5 - Add padding to Status Bar
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.