From 5294db3b779d7f8d70f927c4b80cd45b701c877a Mon Sep 17 00:00:00 2001 From: Nicolas Godet <39594821+nicogodet@users.noreply.github.com> Date: Tue, 7 Jan 2025 14:11:11 +0100 Subject: [PATCH] [pyqt5to6] Add warning if PyQt5 if found --- scripts/pyqt5_to_pyqt6/pyqt5_to_pyqt6.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/pyqt5_to_pyqt6/pyqt5_to_pyqt6.py b/scripts/pyqt5_to_pyqt6/pyqt5_to_pyqt6.py index da4f07c2c7b6a..f803aaeb28dff 100755 --- a/scripts/pyqt5_to_pyqt6/pyqt5_to_pyqt6.py +++ b/scripts/pyqt5_to_pyqt6/pyqt5_to_pyqt6.py @@ -50,6 +50,13 @@ from collections.abc import Sequence from enum import Enum +try: + import PyQt5 + + print("WARNING: PyQt5 has been found. It may result in wrong behavior.\n) +except ImportError: + pass + from PyQt6 import ( Qsci, QtCore,