33 lines
802 B
Python
33 lines
802 B
Python
|
import pip, sys, os
|
||
|
|
||
|
# check if PyQt6 is installed
|
||
|
print('### Checking install of PyQt6 ###')
|
||
|
try:
|
||
|
from PyQt6 import QtCore, QtGui, QtWidgets
|
||
|
print("### Check passed ###")
|
||
|
except ImportError:
|
||
|
print("PyQt6 is not installed. Installing PyQt6...")
|
||
|
pip.main(['install', 'PyQt6'])
|
||
|
print("### PyQt6 installed ###")
|
||
|
|
||
|
from PyQt6.QtWidgets import QApplication
|
||
|
import traceback, configparser
|
||
|
|
||
|
from main_window import MainWindow
|
||
|
|
||
|
def folderCheck(name):
|
||
|
if not os.path.exists(name):
|
||
|
os.makedirs(name)
|
||
|
|
||
|
if __name__ == '__main__':
|
||
|
folderCheck("thumbnails")
|
||
|
|
||
|
# configparser
|
||
|
try:
|
||
|
app = QApplication([])
|
||
|
window = MainWindow()
|
||
|
window.show()
|
||
|
app.exec()
|
||
|
except Exception as e:
|
||
|
print("### Init Error ###")
|
||
|
traceback.print_exc()
|