diff --git a/client-py3/full/src/UDSClient.py b/client-py3/full/src/UDSClient.py index 57b6ec2db..6e53d4e86 100755 --- a/client-py3/full/src/UDSClient.py +++ b/client-py3/full/src/UDSClient.py @@ -38,7 +38,6 @@ import webbrowser import threading import typing -# First, try to use PyQt6, available on arm64, x86_64, i386, ... from uds.ui import QtCore, QtWidgets, QtGui, QSettings, Ui_MainWindow from uds.rest import RestApi, RetryException, InvalidVersion diff --git a/client-py3/full/src/uds/ui/__init__.py b/client-py3/full/src/uds/ui/__init__.py index 9cf8212e7..a8e1d6bf5 100644 --- a/client-py3/full/src/uds/ui/__init__.py +++ b/client-py3/full/src/uds/ui/__init__.py @@ -31,12 +31,13 @@ Author: Adolfo Gómez, dkmaster at dkmon dot com ''' # First, try to use PyQt6, available on arm64, x86_64, i386, ... try: - from PyQt6 import QtCore, QtWidgets, QtGui - from PyQt6.QtCore import QSettings + from PyQt6 import QtCore, QtWidgets, QtGui # type: ignore + from PyQt6.QtCore import QSettings # type: ignore from .qt6.UDSLauncherMac import Ui_MacLauncher from .qt6.UDSWindow import Ui_MainWindow from .qt6 import UDSResources_rc + QT_VERSION = 6 except ImportError: # If not found, try to use PyQt5 (not available on arm64) from PyQt5 import QtCore, QtWidgets, QtGui # type: ignore @@ -45,4 +46,6 @@ except ImportError: # If not found, try to use PyQt5 (not available on arm64) from .qt5.UDSLauncherMac import Ui_MacLauncher # type: ignore from .qt5.UDSWindow import Ui_MainWindow # type: ignore from .qt5 import UDSResources_rc # type: ignore + QT_VERSION = 5 +__all__ = ['QtCore', 'QtWidgets', 'QtGui', 'Ui_MacLauncher', 'Ui_MainWindow', 'UDSResources_rc', 'QSettings', 'QT_VERSION']