Am trying to show the QMainwindow after QDialog.it shows the dialog when it is time to show the QMainWindow program dose not excute.help?
"""#import QtData_Tree as DT import sysimport sqlite3from PyQt5 import QtWidgetsfrom PyQt5.uic import loadUifrom PyQt5.QtWidgets import QMainWindow,QDialog,QApplicationclass Welcom(QDialog): def __init__(self): super(Welcom,self).__init__() loadUi("Welcom.ui",self) self.setWindowTitle("Welcom")class Login(QDialog): def __init__(self): super(Login,self).__init__() loadUi("Login.ui",self) #self.login_btn.clicked.connect(self.loaddata) self.password_input.setEchoMode(QtWidgets.QLineEdit.Password) self.back_btn.clicked.connect(goback) self.login_btn.clicked.connect(goDT)class data_entery(QMainWindow): def __init__(self): super(data_entery,self).__init__() loadUi("QtData_Tree.ui",self)def goDT(): log=QtData_Tree() widget.addWidget(log) widget.setCurrentIndex(widget.currentIndex()+2)app=QApplication(sys.argv) welcom_win=Welcom()widget=QtWidgets.QStackedWidget()widget.addWidget(welcom_win)#widget.setFixedHeight(550)#widget.setFixedWidth(450)widget.show()app.exec()
I created a new file for the QmainWindow it worked but i am having problem linking the two files/programs