Exemplo n.º 1
0
 def openMainWindow(self):
     # Test connection
     result = self.ftp.connect()
     if result.isSuccess:
         username = self.accountInput.text()
         passwd = self.passwdInput.text()
         result = self.ftp.login(username=username, passwd=passwd)
         if result.isSuccess:
             mainWindow = Ui_mainWindow(parent=self, ftp=self.ftp)
             print("mainWindow!")
             mainWindow.resize(1600,2200)
             mainWindow.show()
         else:
             QtWidgets.QMessageBox.warning(self, 'Warning', "Wrong username or password", QtWidgets.QMessageBox.Yes)
     else:
         QtWidgets.QMessageBox.warning(self, 'Warning', "Connection refused", QtWidgets.QMessageBox.Yes)