34 Abstraction for different Python Qt bindings. 36 Supported Python Qt 5 bindings are PyQt and PySide. 37 The Qt modules can be imported like this: 39 from python_qt_binding.QtCore import QObject 40 from python_qt_binding import QtGui, loadUi 42 The name of the selected binding is available in QT_BINDING. 43 The version of the selected binding is available in QT_BINDING_VERSION. 44 All available Qt modules are listed in QT_BINDING_MODULES. 46 The default binding order ('pyqt', 'pyside') can be overridden with a 47 SELECT_QT_BINDING_ORDER attribute on sys: 48 setattr(sys, 'SELECT_QT_BINDING_ORDER', [FIRST_NAME, NEXT_NAME, ..]) 50 A specific binding can be selected with a SELECT_QT_BINDING attribute on sys: 51 setattr(sys, 'SELECT_QT_BINDING', MY_BINDING_NAME) 55 from .binding_helper
import loadUi, QT_BINDING, QT_BINDING_MODULES, QT_BINDING_VERSION
58 for module_name, module
in QT_BINDING_MODULES.items():
59 sys.modules[__name__ +
'.' + module_name] = module
60 setattr(sys.modules[__name__], module_name, module)