From c845c976aa42fbe3135c57e82cc76e4215ea1bac Mon Sep 17 00:00:00 2001 From: Syres916 <46537884+Syres916@users.noreply.github.com> Date: Sun, 4 Aug 2024 15:59:01 +0100 Subject: [PATCH] [AddonManager] Fix regression introduced by #15676 (me)... (#15688) * [AddonManager] Fix regression introduced by #15676... ...it disabled composite view for more than intended * [AddonManager] Use QLibraryInfo major and minor version --- .../Widgets/addonmanager_widget_view_selector.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Mod/AddonManager/Widgets/addonmanager_widget_view_selector.py b/src/Mod/AddonManager/Widgets/addonmanager_widget_view_selector.py index 3e5ef141c198..3049d2319495 100644 --- a/src/Mod/AddonManager/Widgets/addonmanager_widget_view_selector.py +++ b/src/Mod/AddonManager/Widgets/addonmanager_widget_view_selector.py @@ -113,9 +113,10 @@ def _setup_ui(self): self.composite_button = QtWidgets.QToolButton(self) self.composite_button.setObjectName("composite_button") - qtcore_major_ver = int(float(QtCore.qVersion()[0])) - qtcore_minor_ver = int(float(QtCore.qVersion()[2])) - if qtcore_major_ver == 5 and qtcore_minor_ver < 15: + if ( + QtCore.QLibraryInfo.version().majorVersion() == 5 + and QtCore.QLibraryInfo.version().minorVersion() < 15 + ): self.composite_button.setEnabled(False) self.composite_button.setCheckable(False) self.composite_button.setChecked(False)