我试图用PyQt关闭一个窗口,然后打开另一个窗口,但没有发生这种情况。有人能帮我吗?在
我基本上是这样做的:class App(QtGui.QMainWindow, MainWindow.Ui_MainWindow):
def __init__(self, privilegio, db):
super(self.__class__, self).__init__()
self.setupUi(self)
self.get_thread = None
self.db = db
self.privilegio = privilegio
class Login(QtGui.QMainWindow, LoginWindow.Ui_McDonalds):
def __init__(self):
super(self.__class__, self).__init__()
self.setupUi(self)
self.pushButton.clicked.connect(self.verify)
self.db = None
self.db_connection = False
self.connect_db()
def login():
app = QtGui.QApplication(sys.argv)
form_login = Login()
form_login.show()
sys.exit(app.exec_())
if __name__ == '__main__':
login()
if password == result[0][0]:
main(result[0][1], self.db)