Closed apepenkov closed 4 years ago
I have main ui, and want to run children ui on click in main ui. children: `class sessionGenerator(QtWidgets.QMainWindow, designTg.Ui_MainWindow2):
def __init__(self, parent): print(parent) super(sessionGenerator, self).__init__(parent) self.setupUi(self) self.showHelp.clicked.connect(self.showHelpFull) self.next_1.clicked.connect(self.nextOne) self.next_2.clicked.connect(self.nextTwo) self.next_3.clicked.connect(self.nextThree)
....................................................`
if I use `app2 = QtWidgets.QApplication(sys.argv)
window2 = sessionGenerator() window2.show() app2.exec_()`
it appears on a second and throws 0xC0000005
just sessionGenerator runs great itself. But i can't figure out how to run it from another ui
Do not create second main application. only
window2 = sessionGenerator() window2.show()
This lines need to be before first app exec.
app.exec_()
I have main ui, and want to run children ui on click in main ui. children: `class sessionGenerator(QtWidgets.QMainWindow, designTg.Ui_MainWindow2):
....................................................`
if I use `app2 = QtWidgets.QApplication(sys.argv)
it appears on a second and throws 0xC0000005
just sessionGenerator runs great itself. But i can't figure out how to run it from another ui