There are so many options provided by Python to develop GUI application and PyQt5 is one of them. PyQt5 is cross-platform GUI toolkit, a set of python bindings for Qt v5. One can develop an interactive desktop application with so much ease because of the tools and simplicity provided by this library.
setGeometry() method is used to set up the geometry of the PyQt5 window it self.
Syntax : window.setGeometry(x, y, width, height)
Arguments : It takes 4 arguments :
1. X co-ordinate
2. Y co-ordinate
3. Width of the window to be set
4. Height of the window to be set
Below is the implementation of this method.
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 – How to hide label | label.setHidden method
- PyQt5 - lower() method for Labels
- setToolTip method in PyQt5
- move() method in PyQt5
- clear() method in PyQt5
- PyQt5 – How to change text of pre-existing label | setText method
- PyQt5 – How to change size of the Label | label.resize method
- PyQt5 – How to clear the content of label | clear and setText method
- deleteLater() method in PyQt5
- close() method in PyQt5
- Set Window Icon Text in PyQt5 | setWindowIconText() method
- PyQt5 – What's this help text for Label | setWhatsThis() method
- PyQt5 - Get opacity level of the main window | windowOpacity() method
- PyQt5 – How to stop resizing of window | setFixedSize() method
- PyQt5 – How to set tooltip duration for Label | setToolTipDuration method
- PyQt5 – How to set minimum size of window | setMinimumSize method
- PyQt5 – Set minimum window size | setMinimumWidth and setMinimumHeight method
- PyQt5 – Access tool tip duration of label | ToolTipDuration method
- PyQt5 – Get tooltip data of label | toolTip() method
- PyQt5 – rect() method
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. 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.