From 10b101a972fe480d96daaef19a9c11bd73ba2f31 Mon Sep 17 00:00:00 2001 From: Rhys Mainwaring Date: Mon, 29 Aug 2022 22:56:23 +0100 Subject: [PATCH] Remove pyqt from default binding order for macOS - Suppress debug messages - Remove pyqt from default binding order Signed-off-by: Rhys Mainwaring --- src/python_qt_binding/binding_helper.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/python_qt_binding/binding_helper.py b/src/python_qt_binding/binding_helper.py index 603e1e2..0cb904f 100644 --- a/src/python_qt_binding/binding_helper.py +++ b/src/python_qt_binding/binding_helper.py @@ -36,6 +36,7 @@ # since the 'future' package provides a 'builtins' module in Python 2 # this must not be checked second import builtins +import platform import os import sys import traceback @@ -50,7 +51,11 @@ def _select_qt_binding(binding_name=None, binding_order=None): global QT_BINDING, QT_BINDING_VERSION # order of default bindings can be changed here - DEFAULT_BINDING_ORDER = ['pyqt', 'pyside'] + if platform.system() == 'Darwin': + DEFAULT_BINDING_ORDER = ['pyside'] + else: + DEFAULT_BINDING_ORDER = ['pyqt', 'pyside'] + binding_order = binding_order or DEFAULT_BINDING_ORDER # determine binding preference