Most of the online tutorials are written to close the interface directly. I figured out a way: bind two events at the same time.
# Self-method self.registerButton.clicked.connect(self.register_re) # Close the interface self.registerButton.clicked.connect(login.close)
The code order represents the order of progress. The previous example first runs its own function and then closes the current window.
The above Pyqt5 method of realizing jump interface and closing the current interface is to share all the content of the editor, I hope to give you a reference, and I hope you will support developpaer more.