def _pyside2():
"""Initialise PySide2
These functions serve to test the existence of a binding
along with set it up in such a way that it aligns with
the final step; adding members from the original binding
to Qt.py
"""
import PySide2 as module
_setup(module, ["QtUiTools"])
Qt.__binding_version__ = module.__version__
if hasattr(Qt, "_QtUiTools"):
Qt.QtCompat.loadUi = _loadUi
if hasattr(Qt, "_QtGui") and hasattr(Qt, "_QtCore"):
Qt.QtCore.QStringListModel = Qt._QtGui.QStringListModel
if hasattr(Qt, "_QtWidgets"):
Qt.QtCompat.setSectionResizeMode = \
Qt._QtWidgets.QHeaderView.setSectionResizeMode
if hasattr(Qt, "_QtCore"):
Qt.__qt_version__ = Qt._QtCore.qVersion()
Qt.QtCompat.translate = Qt._QtCore.QCoreApplication.translate
Qt.QtCore.Property = Qt._QtCore.Property
Qt.QtCore.Signal = Qt._QtCore.Signal
Qt.QtCore.Slot = Qt._QtCore.Slot
Qt.QtCore.QAbstractProxyModel = Qt._QtCore.QAbstractProxyModel
Qt.QtCore.QSortFilterProxyModel = Qt._QtCore.QSortFilterProxyModel
Qt.QtCore.QItemSelection = Qt._QtCore.QItemSelection
Qt.QtCore.QItemSelectionRange = Qt._QtCore.QItemSelectionRange
Qt.QtCore.QItemSelectionModel = Qt._QtCore.QItemSelectionModel
评论列表
文章目录