In this article, we will see how to use
close() method which belongs to the
QWidget class, this method is used to close the window in PyQt5 application. In other words by
close() method the window get closed without manually closing it.
Syntax : self.close()
Argument : It takes no argument.
This will open the window and after 2 seconds it will automatically closes the window.
- PyQt5 QCalendarWidget - Setting Close Event
- Python | os.close() method
- How to use close() and quit() method in Selenium Python ?
- close driver method - Selenium Python
- Python | Find all close matches of input string from a list
- response.close() - Python requests
- Matplotlib.pyplot.close() in Python
- How to open and close a file in Python
- Python - Convert Tick-by-Tick data into OHLC (Open-High-Low-Close) Data
- PYGLET – On Close Event
- PyQt5 – How to hide label | label.setHidden method
- PyQt5 - lower() method for Labels
- setGeometry method - Pyqt5
- 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
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.