diff --git a/build.sh b/build.sh index 647e6b4..7641db3 100755 --- a/build.sh +++ b/build.sh @@ -1,4 +1,4 @@ #!/bin/bash for ui in *.ui; do - pyside6-uic $ui > ${ui%.*}.py + pyside2-uic $ui > ${ui%.*}.py done \ No newline at end of file diff --git a/main.py b/main.py index 8573b81..fe460c9 100644 --- a/main.py +++ b/main.py @@ -6,8 +6,8 @@ from pathlib import Path import shutil import zlib import requests -from PySide6.QtCore import QProcess -from PySide6.QtWidgets import QApplication, QMainWindow, QFileDialog, QMessageBox, QPushButton +from PySide2.QtCore import QProcess +from PySide2.QtWidgets import QApplication, QMainWindow, QFileDialog, QMessageBox, QPushButton from mainwindow import Ui_MainWindow @@ -169,6 +169,9 @@ if __name__ == "__main__": try: window = MainWindow() window.show() - sys.exit(app.exec()) + sys.exit(app.exec_()) + except SystemExit: + sys.exit(0) except: + traceback.print_exc() sys.exit(1) diff --git a/mainwindow.py b/mainwindow.py index 9172660..75d0347 100644 --- a/mainwindow.py +++ b/mainwindow.py @@ -3,21 +3,15 @@ ################################################################################ ## Form generated from reading UI file 'mainwindow.ui' ## -## Created by: Qt User Interface Compiler version 6.2.2 +## Created by: Qt User Interface Compiler version 5.15.2 ## ## WARNING! All changes made in this file will be lost when recompiling UI file! ################################################################################ -from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale, - QMetaObject, QObject, QPoint, QRect, - QSize, QTime, QUrl, Qt) -from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor, - QFont, QFontDatabase, QGradient, QIcon, - QImage, QKeySequence, QLinearGradient, QPainter, - QPalette, QPixmap, QRadialGradient, QTransform) -from PySide6.QtWidgets import (QApplication, QGridLayout, QLabel, QLineEdit, - QMainWindow, QMenuBar, QPushButton, QSizePolicy, - QWidget) +from PySide2.QtCore import * +from PySide2.QtGui import * +from PySide2.QtWidgets import * + class Ui_MainWindow(object): def setupUi(self, MainWindow): @@ -39,6 +33,7 @@ class Ui_MainWindow(object): self.pushButton = QPushButton(self.gridLayoutWidget) self.pushButton.setObjectName(u"pushButton") + self.pushButton.setEnabled(False) self.gridLayout.addWidget(self.pushButton, 0, 2, 1, 1) diff --git a/requirements.txt b/requirements.txt index bbe75c7..2157bbe 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ -PySide6 +PySide2 pyinstaller requests \ No newline at end of file