Exemplo n.º 1
0
    try:

        splash_pix = QtGui.QPixmap("Resources/splash.png")
        splash = QtGui.QSplashScreen(splash_pix,
                                     QtCore.Qt.WindowStaysOnTopHint)
        splash.setMask(splash_pix.mask())
        splash.show()
        app.processEvents()

        # Database.connect(host="localhost",
        #                  databaseName="salaryManagement_test_1",
        #                  username="******",
        #                  password="******")

        Database.connect(host="remotemysql.com",
                         username="******",
                         password="******",
                         databaseName="ll703lm6tX")

        w = MainWindow()

        styleSheetFile = QtCore.QFile("styleSheet/flatStyleSheet.css")
        styleSheetFile.open(QtCore.QIODevice.ReadOnly)
        w.setStyleSheet(str(styleSheetFile.readAll()))

        w.show()

        splash.finish(w)

    except mysql.connector.Error as e:
        splash.close()
        ShowMysqlError(e)
Exemplo n.º 2
0
    try:

        splash_pix = QtGui.QPixmap("Resources/splash.png")
        splash = QtGui.QSplashScreen(splash_pix, QtCore.Qt.WindowStaysOnTopHint)
        splash.setMask(splash_pix.mask())
        splash.show()
        app.processEvents()

        # Database.connect(host="localhost",
        #                  databaseName="salaryManagement_test_1",
        #                  username="******",
        #                  password="******")

        Database.connect(host="remotemysql.com",
                         username="******",
                         password="******",
                         databaseName="41Ng5H2E1B")

        w = MainWindow()

        styleSheetFile = QtCore.QFile("styleSheet/flatStyleSheet.css")
        styleSheetFile.open(QtCore.QIODevice.ReadOnly)
        w.setStyleSheet(str(styleSheetFile.readAll()))

        w.show()

        splash.finish(w)

    except mysql.connector.Error as e:
        splash.close()
        ShowMysqlError(e)