Pyqt5 close second window. close () method to close a window.