Example #1
0
    def register(self):
        username = self.user_r.text()
        passw = self.pass_r.text()
        cpassword = self.cpass_r.text()
        dbcon = pymysql.connect(
            host="rapcwc.cakorcerkah4.us-east-2.rds.amazonaws.com",
            user="******",
            password="******",
            db="RAP")
        cursor = dbcon.cursor()
        if passw == cpassword:
            cursor.execute(
                "INSERT INTO RAP.login (`user`, `password`) VALUES (%s, %s);",
                (username, passw))
            dbcon.commit()
            dbcon.close()
            self.closew()
            from login import Ui_MainWindow
            self.window = QtWidgets.QMainWindow()
            self.ui = Ui_MainWindow()
            self.ui.setupUi(self.window)
            self.window.show()

        else:
            self.error()

        print(passw)
        print(cpassword)
Example #2
0
    def run(self):  # 2. Implement run()
        MainWindow = QMainWindow()
        ui = Ui_MainWindow(self)
        self.ui_hello = hello_mainWindow()
        ui.setupUi(MainWindow)
        MainWindow.show()

        return self.app.exec_()  # 3. End run() with this line
Example #3
0
    def __init__(self):
        QtGui.QMainWindow.__init__(self)
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)

        QtCore.QMetaObject.connectSlotsByName(self)
        QtCore.QObject.connect(self.ui.buttonEntrar,
                               QtCore.SIGNAL("clicked()"), self.Entrar)
        QtCore.QObject.connect(self.ui.buttonCreate,
                               QtCore.SIGNAL("clicked()"), self.Create)
Example #4
0
 def openWindow1(self):
     self.window=QtWidgets.QMainWindow()
     self.ui=Ui_MainWindow()
     self.ui.setupUi(self.window)
     name=self.textEdit.toPlainText()
     email=self.textEdit_2.toPlainText()
     mobile=self.textEdit_3.toPlainText()
     address=self.textEdit_4.toPlainText()
     place=self.textEdit_5.toPlainText()
     usrname=self.textEdit_6.toPlainText()
     psw=self.textEdit_7.toPlainText()
     query="INSERT INTO register (name,email,mobile,address,place,usrname,psw) VALUES (%s,%s,%s,%s,%s,%s,%s)"
     query1="INSERT INTO login (username,password) VALUES (%s,%s)"
     print("hai")
     cursor.execute(query,(name,email,mobile,address,place,usrname,psw))
     cursor.execute(query1,(usrname,psw))
     db.commit()
     print(cursor.rowcount, "record inserted.")
     self.window.show()
Example #5
0
File: 404.py Project: Torbenn/Orb
 def login(self):
     self.login = QtWidgets.QMainWindow()
     self.ui = Ui_MainWindow()
     self.ui.setupUi(self.login)
     self.login.show()
Example #6
0
 def __init__(self):
     super().__init__()
     self.ui = Ui_MainWindow()
     self.ui.setupUi(self)
     self.initUI()
     self.show()
Example #7
0
    def __init__(self):
        super(LoginDialog, self).__init__()

        # Set up the user interface from Designer.
        self.ui = Ui_MainWindow()
        self.ui.setupUi(self)
Example #8
0
 def __init__(self):
     super().__init__()
     self.mainWindow = Ui_MainWindow()
     self.mainWindow.setupUi(self)
     self.show()
Example #9
0
 def openWindow(self):
     self.window=QtWidgets.QMainWindow()
     self.ui=Ui_MainWindow()
     self.ui.setupUi(self.window)
     
     self.window.show()
Example #10
0
from owner import Ui_ownerPage
from billGenerator import Ui_BILL
from login import Ui_MainWindow
from PyQt5 import QtWidgets
from PyQt5 import QtCore, QtGui

if __name__ == "__main__":
    import sys
    app = QtWidgets.QApplication(sys.argv)
    MainWindow = QtWidgets.QMainWindow()
    ui = Ui_MainWindow()
    ui.setupUi(MainWindow)
    MainWindow.show()
    sys.exit(app.exec_())