close() method in PyQt5
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.