-
Notifications
You must be signed in to change notification settings - Fork 18
/
MainProgram.py
39 lines (28 loc) · 876 Bytes
/
MainProgram.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import sys
import os
from InstallWindow import InstallWindow
from LoginWindow import LoginScreen
from PyQt5.QtWidgets import QApplication,QSplashScreen,QLabel
from PyQt5.QtGui import QPixmap
from PyQt5.QtCore import Qt,QTimer
class MainScreen():
def showSplashScreen(self):
self.pix=QPixmap("python_vehicle.jpg")
self.splassh=QSplashScreen(self.pix,Qt.WindowStaysOnTopHint)
self.splassh.show()
def showSetupWindow():
mainScreen.splassh.close()
installWindow.show()
def showLoginWindow():
mainScreen.splassh.close()
login.showLoginScreen()
app=QApplication(sys.argv)
login=LoginScreen()
mainScreen=MainScreen()
mainScreen.showSplashScreen()
installWindow=InstallWindow()
if os.path.exists("./config.json"):
QTimer.singleShot(3000,showLoginWindow)
else:
QTimer.singleShot(3000,showSetupWindow)
sys.exit(app.exec_())