Answer the question
In order to leave comments, you need to log in
Pyqt5 how to open a second window on click???
For some reason the window closes.
Window 2:
class mywindow2(QtWidgets.QMainWindow):
def __init__(self):
super(mywindow2, self).__init__()
self.ui = My_Window()
self.ui.setupUi(self)
def show_w2(self):
w2 = mywindow2()
w2.show()
sys.exit(app.exec())
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question