-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.py
executable file
·36 lines (28 loc) · 950 Bytes
/
app.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
#!/usr/bin/env python2
#################################
# app.py #
# #
# Copyright 2011 ThePsyjo #
# #
# distributed under the terms #
# of the #
# GNU General Public License v2 #
#################################
import sys
from PyQt4.QtGui import QApplication, QIcon, QMessageBox
from PyQt4.QtCore import QTranslator, QLocale
import classdir.res
app = QApplication(sys.argv)
translator = QTranslator()
if not translator.load(':/%s' % QLocale.languageToString(QLocale.system().language())):
if not translator.load(":/en.qm"):
QMessageBox.critical(None, "Error", "Something went wrong while loading language. See project-site if there are any updates.")
sys.exit(1)
app.installTranslator(translator)
app.setWindowIcon(QIcon(':/appicon'))
app.setApplicationName('PyWebViewer')
app.setApplicationVersion('1.0.4')
app.setQuitOnLastWindowClosed(False)
from classdir.window import MainWindow
w = MainWindow()
sys.exit(app.exec_())