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):
super().__init__()
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)
# all another code
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_()
User contributions licensed under CC BY-SA 3.0