From c1ecd5a745e22aa502a49eb416b5e3fd2e35491b Mon Sep 17 00:00:00 2001 From: David Aguilar Date: Sun, 19 Nov 2023 03:17:37 -0800 Subject: [PATCH] about: add PyQt6 compatibility for getting the PyQt version Signed-off-by: David Aguilar --- cola/widgets/about.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cola/widgets/about.py b/cola/widgets/about.py index d2bea9ad..522fee70 100644 --- a/cola/widgets/about.py +++ b/cola/widgets/about.py @@ -152,7 +152,11 @@ def version_text(context): qt_version = qtpy.QT_VERSION qtpy_version = qtpy.__version__ pyqt_api_name = qtpy.API_NAME - if qtpy.PYQT5 or qtpy.PYQT4: + if ( + getattr(qtpy, 'PYQT6', False) + or getattr(qtpy, 'PYQT5', False) + or getattr(qtpy, 'PYQT4', False) + ): pyqt_api_version = qtpy.PYQT_VERSION elif qtpy.PYSIDE: pyqt_api_version = qtpy.PYSIDE_VERSION -- 2.11.4.GIT