Python PyQt5.sip.delete() Examples

The following are 18 code examples of PyQt5.sip.delete(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module PyQt5.sip , or try the search function .
Example #1
Source File: Qt.py    From pyblish-qml with GNU Lesser General Public License v3.0 5 votes vote down vote up
def _pyqt5():
    """Initialise PyQt5"""

    import PyQt5 as module
    extras = ["uic"]

    try:
        import sip
        extras += ["sip"]
    except ImportError:

        # Relevant to PyQt5 5.11 and above
        try:
            from PyQt5 import sip
            extras += ["sip"]
        except ImportError:
            sip = None

    _setup(module, extras)
    if hasattr(Qt, "_sip"):
        Qt.QtCompat.wrapInstance = _wrapinstance
        Qt.QtCompat.getCppPointer = _getcpppointer
        Qt.QtCompat.delete = sip.delete

    if hasattr(Qt, "_uic"):
        Qt.QtCompat.loadUi = _loadUi

    if hasattr(Qt, "_QtCore"):
        Qt.__binding_version__ = Qt._QtCore.PYQT_VERSION_STR
        Qt.__qt_version__ = Qt._QtCore.QT_VERSION_STR
        Qt.QtCompat.dataChanged = (
            lambda self, topleft, bottomright, roles=None:
            self.dataChanged.emit(topleft, bottomright, roles or [])
        )

    if hasattr(Qt, "_QtWidgets"):
        Qt.QtCompat.setSectionResizeMode = \
            Qt._QtWidgets.QHeaderView.setSectionResizeMode

    _reassign_misplaced_members("PyQt5")
    _build_compatibility_members('PyQt5') 
Example #2
Source File: Qt.py    From dpAutoRigSystem with GNU General Public License v2.0 5 votes vote down vote up
def _pyqt5():
    """Initialise PyQt5"""

    import PyQt5 as module
    extras = ["uic"]

    try:
        import sip
        extras += ["sip"]
    except ImportError:

        # Relevant to PyQt5 5.11 and above
        try:
            from PyQt5 import sip
            extras += ["sip"]
        except ImportError:
            sip = None

    _setup(module, extras)
    if hasattr(Qt, "_sip"):
        Qt.QtCompat.wrapInstance = _wrapinstance
        Qt.QtCompat.getCppPointer = _getcpppointer
        Qt.QtCompat.delete = sip.delete

    if hasattr(Qt, "_uic"):
        Qt.QtCompat.loadUi = _loadUi

    if hasattr(Qt, "_QtCore"):
        Qt.__binding_version__ = Qt._QtCore.PYQT_VERSION_STR
        Qt.__qt_version__ = Qt._QtCore.QT_VERSION_STR
        Qt.QtCompat.dataChanged = (
            lambda self, topleft, bottomright, roles=None:
            self.dataChanged.emit(topleft, bottomright, roles or [])
        )

    if hasattr(Qt, "_QtWidgets"):
        Qt.QtCompat.setSectionResizeMode = \
            Qt._QtWidgets.QHeaderView.setSectionResizeMode

    _reassign_misplaced_members("PyQt5")
    _build_compatibility_members('PyQt5') 
Example #3
Source File: Qt.py    From NodeGraphQt with MIT License 5 votes vote down vote up
def _pyqt5():
    """Initialise PyQt5"""

    import PyQt5 as module
    extras = ["uic"]

    try:
        import sip
        extras += ["sip"]
    except ImportError:

        # Relevant to PyQt5 5.11 and above
        try:
            from PyQt5 import sip
            extras += ["sip"]
        except ImportError:
            sip = None

    _setup(module, extras)
    if hasattr(Qt, "_sip"):
        Qt.QtCompat.wrapInstance = _wrapinstance
        Qt.QtCompat.getCppPointer = _getcpppointer
        Qt.QtCompat.delete = sip.delete

    if hasattr(Qt, "_uic"):
        Qt.QtCompat.loadUi = _loadUi

    if hasattr(Qt, "_QtCore"):
        Qt.__binding_version__ = Qt._QtCore.PYQT_VERSION_STR
        Qt.__qt_version__ = Qt._QtCore.QT_VERSION_STR
        Qt.QtCompat.dataChanged = (
            lambda self, topleft, bottomright, roles=None:
            self.dataChanged.emit(topleft, bottomright, roles or [])
        )

    if hasattr(Qt, "_QtWidgets"):
        Qt.QtCompat.setSectionResizeMode = \
            Qt._QtWidgets.QHeaderView.setSectionResizeMode

    _reassign_misplaced_members("PyQt5")
    _build_compatibility_members('PyQt5') 
Example #4
Source File: gui.py    From vise with GNU General Public License v3.0 5 votes vote down vote up
def remove_selected(self):
        keys = set(self.selected_keys())
        if not keys:
            return error_dialog(self, _('No entries selected'), _(
                'You must select an entry to remove'))
        changed = False
        for key in keys:
            if question_dialog(self, _('Are you sure?'), _(
                    'Are you sure you want to permanently delete all data for: <b>{0}</b>').format(key)):
                del self.db[key]
                changed = True
        if changed:
            self.model.refresh(self.db) 
Example #5
Source File: gui.py    From vise with GNU General Public License v3.0 5 votes vote down vote up
def standalone(password, path=None):
    from ..main import Application
    db = PasswordDB(password, path)
    app = Application([])
    d = PasswordManager(db)
    d.exec_()
    sip.delete(d)
    sip.delete(app) 
Example #6
Source File: main.py    From vise with GNU General Public License v3.0 5 votes vote down vote up
def run_app(
        urls=(), callback=None, callback_wait=0,
        master_password=None, new_instance=False, shutdown=False, restart_state=None, no_session=False, startup_session=None):
    env = os.environ.copy()
    app = Application(
        master_password=master_password, urls=urls, new_instance=new_instance, shutdown=shutdown, restart_state=restart_state, no_session=no_session)
    os.environ['QTWEBENGINE_DICTIONARIES_PATH'] = os.path.join(config_dir, 'spell')
    app.original_env = env
    style = Style()
    app.setStyle(style)
    try:
        if startup_session is not None:
            with open(startup_session, 'rb') as f:
                app.unserialize_state(pickle.load(f))
        elif restart_state is not None:
            app.unserialize_state(restart_state)
        else:
            last_session = last_saved_session(no_session)
            if last_session is None or urls:
                app.open_urls(urls)
            else:
                app.unserialize_state(last_session)
        if callback is not None:
            QTimer.singleShot(callback_wait, callback)
        app.exec_()
    finally:
        app.break_cycles()
        delete_profile()
        places.close()
        app.sendPostedEvents()
        restart_state = getattr(app, 'restart_state', None)
        original_env = app.original_env
        sip.delete(app)
        del app
        gc.collect(), gc.collect(), gc.collect()
        if restart_state is not None:
            restart(restart_state, original_env) 
Example #7
Source File: Qt.py    From Qt.py with MIT License 5 votes vote down vote up
def _pyqt5():
    """Initialise PyQt5"""

    import PyQt5 as module
    extras = ["uic"]

    try:
        # Relevant to PyQt5 5.11 and above
        from PyQt5 import sip
        extras += ["sip"]
    except ImportError:

        try:
            import sip
            extras += ["sip"]
        except ImportError:
            sip = None

    _setup(module, extras)
    if hasattr(Qt, "_sip"):
        Qt.QtCompat.wrapInstance = _wrapinstance
        Qt.QtCompat.getCppPointer = _getcpppointer
        Qt.QtCompat.delete = sip.delete

    if hasattr(Qt, "_uic"):
        Qt.QtCompat.loadUi = _loadUi

    if hasattr(Qt, "_QtCore"):
        Qt.__binding_version__ = Qt._QtCore.PYQT_VERSION_STR
        Qt.__qt_version__ = Qt._QtCore.QT_VERSION_STR
        Qt.QtCompat.dataChanged = (
            lambda self, topleft, bottomright, roles=None:
            self.dataChanged.emit(topleft, bottomright, roles or [])
        )

    if hasattr(Qt, "_QtWidgets"):
        Qt.QtCompat.setSectionResizeMode = \
            Qt._QtWidgets.QHeaderView.setSectionResizeMode

    _reassign_misplaced_members("PyQt5")
    _build_compatibility_members('PyQt5') 
Example #8
Source File: Qt.py    From SiShelf with MIT License 5 votes vote down vote up
def _pyqt5():
    """Initialise PyQt5"""

    import PyQt5 as module
    extras = ["uic"]

    try:
        import sip
        extras += ["sip"]
    except ImportError:

        # Relevant to PyQt5 5.11 and above
        try:
            from PyQt5 import sip
            extras += ["sip"]
        except ImportError:
            sip = None

    _setup(module, extras)
    if hasattr(Qt, "_sip"):
        Qt.QtCompat.wrapInstance = _wrapinstance
        Qt.QtCompat.getCppPointer = _getcpppointer
        Qt.QtCompat.delete = sip.delete

    if hasattr(Qt, "_uic"):
        Qt.QtCompat.loadUi = _loadUi

    if hasattr(Qt, "_QtCore"):
        Qt.__binding_version__ = Qt._QtCore.PYQT_VERSION_STR
        Qt.__qt_version__ = Qt._QtCore.QT_VERSION_STR
        Qt.QtCompat.dataChanged = (
            lambda self, topleft, bottomright, roles=None:
            self.dataChanged.emit(topleft, bottomright, roles or [])
        )

    if hasattr(Qt, "_QtWidgets"):
        Qt.QtCompat.setSectionResizeMode = \
            Qt._QtWidgets.QHeaderView.setSectionResizeMode

    _reassign_misplaced_members("PyQt5")
    _build_compatibility_members('PyQt5') 
Example #9
Source File: Qt.py    From SiShelf with MIT License 4 votes vote down vote up
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
    extras = ["QtUiTools"]
    try:
        try:
            # Before merge of PySide and shiboken
            import shiboken2
        except ImportError:
            # After merge of PySide and shiboken, May 2017
            from PySide2 import shiboken2
        extras.append("shiboken2")
    except ImportError:
        pass

    _setup(module, extras)
    Qt.__binding_version__ = module.__version__

    if hasattr(Qt, "_shiboken2"):
        Qt.QtCompat.wrapInstance = _wrapinstance
        Qt.QtCompat.getCppPointer = _getcpppointer
        Qt.QtCompat.delete = shiboken2.delete

    if hasattr(Qt, "_QtUiTools"):
        Qt.QtCompat.loadUi = _loadUi

    if hasattr(Qt, "_QtCore"):
        Qt.__qt_version__ = Qt._QtCore.qVersion()
        Qt.QtCompat.dataChanged = (
            lambda self, topleft, bottomright, roles=None:
            self.dataChanged.emit(topleft, bottomright, roles or [])
        )

    if hasattr(Qt, "_QtWidgets"):
        Qt.QtCompat.setSectionResizeMode = \
            Qt._QtWidgets.QHeaderView.setSectionResizeMode

    _reassign_misplaced_members("PySide2")
    _build_compatibility_members("PySide2") 
Example #10
Source File: Qt.py    From pyblish-qml with GNU Lesser General Public License v3.0 4 votes vote down vote up
def _pyside():
    """Initialise PySide"""

    import PySide as module
    extras = ["QtUiTools"]
    try:
        try:
            # Before merge of PySide and shiboken
            import shiboken
        except ImportError:
            # After merge of PySide and shiboken, May 2017
            from PySide import shiboken
        extras.append("shiboken")
    except ImportError:
        pass

    _setup(module, extras)
    Qt.__binding_version__ = module.__version__

    if hasattr(Qt, "_shiboken"):
        Qt.QtCompat.wrapInstance = _wrapinstance
        Qt.QtCompat.getCppPointer = _getcpppointer
        Qt.QtCompat.delete = shiboken.delete

    if hasattr(Qt, "_QtUiTools"):
        Qt.QtCompat.loadUi = _loadUi

    if hasattr(Qt, "_QtGui"):
        setattr(Qt, "QtWidgets", _new_module("QtWidgets"))
        setattr(Qt, "_QtWidgets", Qt._QtGui)
        if hasattr(Qt._QtGui, "QX11Info"):
            setattr(Qt, "QtX11Extras", _new_module("QtX11Extras"))
            Qt.QtX11Extras.QX11Info = Qt._QtGui.QX11Info

        Qt.QtCompat.setSectionResizeMode = Qt._QtGui.QHeaderView.setResizeMode

    if hasattr(Qt, "_QtCore"):
        Qt.__qt_version__ = Qt._QtCore.qVersion()
        Qt.QtCompat.dataChanged = (
            lambda self, topleft, bottomright, roles=None:
            self.dataChanged.emit(topleft, bottomright)
        )

    _reassign_misplaced_members("PySide")
    _build_compatibility_members("PySide") 
Example #11
Source File: Qt.py    From pyblish-qml with GNU Lesser General Public License v3.0 4 votes vote down vote up
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
    extras = ["QtUiTools"]
    try:
        try:
            # Before merge of PySide and shiboken
            import shiboken2
        except ImportError:
            # After merge of PySide and shiboken, May 2017
            from PySide2 import shiboken2
        extras.append("shiboken2")
    except ImportError:
        pass

    _setup(module, extras)
    Qt.__binding_version__ = module.__version__

    if hasattr(Qt, "_shiboken2"):
        Qt.QtCompat.wrapInstance = _wrapinstance
        Qt.QtCompat.getCppPointer = _getcpppointer
        Qt.QtCompat.delete = shiboken2.delete

    if hasattr(Qt, "_QtUiTools"):
        Qt.QtCompat.loadUi = _loadUi

    if hasattr(Qt, "_QtCore"):
        Qt.__qt_version__ = Qt._QtCore.qVersion()
        Qt.QtCompat.dataChanged = (
            lambda self, topleft, bottomright, roles=None:
            self.dataChanged.emit(topleft, bottomright, roles or [])
        )

    if hasattr(Qt, "_QtWidgets"):
        Qt.QtCompat.setSectionResizeMode = \
            Qt._QtWidgets.QHeaderView.setSectionResizeMode

    _reassign_misplaced_members("PySide2")
    _build_compatibility_members("PySide2") 
Example #12
Source File: Qt.py    From Qt.py with MIT License 4 votes vote down vote up
def _pyside():
    """Initialise PySide"""

    import PySide as module
    extras = ["QtUiTools"]
    try:
        try:
            # Before merge of PySide and shiboken
            import shiboken
        except ImportError:
            # After merge of PySide and shiboken, May 2017
            from PySide import shiboken
        extras.append("shiboken")
    except ImportError:
        pass

    _setup(module, extras)
    Qt.__binding_version__ = module.__version__

    if hasattr(Qt, "_shiboken"):
        Qt.QtCompat.wrapInstance = _wrapinstance
        Qt.QtCompat.getCppPointer = _getcpppointer
        Qt.QtCompat.delete = shiboken.delete

    if hasattr(Qt, "_QtUiTools"):
        Qt.QtCompat.loadUi = _loadUi

    if hasattr(Qt, "_QtGui"):
        setattr(Qt, "QtWidgets", _new_module("QtWidgets"))
        setattr(Qt, "_QtWidgets", Qt._QtGui)
        if hasattr(Qt._QtGui, "QX11Info"):
            setattr(Qt, "QtX11Extras", _new_module("QtX11Extras"))
            Qt.QtX11Extras.QX11Info = Qt._QtGui.QX11Info

        Qt.QtCompat.setSectionResizeMode = Qt._QtGui.QHeaderView.setResizeMode

    if hasattr(Qt, "_QtCore"):
        Qt.__qt_version__ = Qt._QtCore.qVersion()
        Qt.QtCompat.dataChanged = (
            lambda self, topleft, bottomright, roles=None:
            self.dataChanged.emit(topleft, bottomright)
        )

    _reassign_misplaced_members("PySide")
    _build_compatibility_members("PySide") 
Example #13
Source File: Qt.py    From Qt.py with MIT License 4 votes vote down vote up
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
    extras = ["QtUiTools"]
    try:
        try:
            # Before merge of PySide and shiboken
            import shiboken2
        except ImportError:
            # After merge of PySide and shiboken, May 2017
            from PySide2 import shiboken2
        extras.append("shiboken2")
    except ImportError:
        pass

    _setup(module, extras)
    Qt.__binding_version__ = module.__version__

    if hasattr(Qt, "_shiboken2"):
        Qt.QtCompat.wrapInstance = _wrapinstance
        Qt.QtCompat.getCppPointer = _getcpppointer
        Qt.QtCompat.delete = shiboken2.delete

    if hasattr(Qt, "_QtUiTools"):
        Qt.QtCompat.loadUi = _loadUi

    if hasattr(Qt, "_QtCore"):
        Qt.__qt_version__ = Qt._QtCore.qVersion()
        Qt.QtCompat.dataChanged = (
            lambda self, topleft, bottomright, roles=None:
            self.dataChanged.emit(topleft, bottomright, roles or [])
        )

    if hasattr(Qt, "_QtWidgets"):
        Qt.QtCompat.setSectionResizeMode = \
            Qt._QtWidgets.QHeaderView.setSectionResizeMode

    _reassign_misplaced_members("PySide2")
    _build_compatibility_members("PySide2") 
Example #14
Source File: Qt.py    From SiShelf with MIT License 4 votes vote down vote up
def _pyside():
    """Initialise PySide"""

    import PySide as module
    extras = ["QtUiTools"]
    try:
        try:
            # Before merge of PySide and shiboken
            import shiboken
        except ImportError:
            # After merge of PySide and shiboken, May 2017
            from PySide import shiboken
        extras.append("shiboken")
    except ImportError:
        pass

    _setup(module, extras)
    Qt.__binding_version__ = module.__version__

    if hasattr(Qt, "_shiboken"):
        Qt.QtCompat.wrapInstance = _wrapinstance
        Qt.QtCompat.getCppPointer = _getcpppointer
        Qt.QtCompat.delete = shiboken.delete

    if hasattr(Qt, "_QtUiTools"):
        Qt.QtCompat.loadUi = _loadUi

    if hasattr(Qt, "_QtGui"):
        setattr(Qt, "QtWidgets", _new_module("QtWidgets"))
        setattr(Qt, "_QtWidgets", Qt._QtGui)
        if hasattr(Qt._QtGui, "QX11Info"):
            setattr(Qt, "QtX11Extras", _new_module("QtX11Extras"))
            Qt.QtX11Extras.QX11Info = Qt._QtGui.QX11Info

        Qt.QtCompat.setSectionResizeMode = Qt._QtGui.QHeaderView.setResizeMode

    if hasattr(Qt, "_QtCore"):
        Qt.__qt_version__ = Qt._QtCore.qVersion()
        Qt.QtCompat.dataChanged = (
            lambda self, topleft, bottomright, roles=None:
            self.dataChanged.emit(topleft, bottomright)
        )

    _reassign_misplaced_members("PySide")
    _build_compatibility_members("PySide") 
Example #15
Source File: Qt.py    From dpAutoRigSystem with GNU General Public License v2.0 4 votes vote down vote up
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
    extras = ["QtUiTools"]
    try:
        try:
            # Before merge of PySide and shiboken
            import shiboken2
        except ImportError:
            # After merge of PySide and shiboken, May 2017
            from PySide2 import shiboken2
        extras.append("shiboken2")
    except ImportError:
        pass

    _setup(module, extras)
    Qt.__binding_version__ = module.__version__

    if hasattr(Qt, "_shiboken2"):
        Qt.QtCompat.wrapInstance = _wrapinstance
        Qt.QtCompat.getCppPointer = _getcpppointer
        Qt.QtCompat.delete = shiboken2.delete

    if hasattr(Qt, "_QtUiTools"):
        Qt.QtCompat.loadUi = _loadUi

    if hasattr(Qt, "_QtCore"):
        Qt.__qt_version__ = Qt._QtCore.qVersion()
        Qt.QtCompat.dataChanged = (
            lambda self, topleft, bottomright, roles=None:
            self.dataChanged.emit(topleft, bottomright, roles or [])
        )

    if hasattr(Qt, "_QtWidgets"):
        Qt.QtCompat.setSectionResizeMode = \
            Qt._QtWidgets.QHeaderView.setSectionResizeMode

    _reassign_misplaced_members("PySide2")
    _build_compatibility_members("PySide2") 
Example #16
Source File: Qt.py    From NodeGraphQt with MIT License 4 votes vote down vote up
def _pyside():
    """Initialise PySide"""

    import PySide as module
    extras = ["QtUiTools"]
    try:
        try:
            # Before merge of PySide and shiboken
            import shiboken
        except ImportError:
            # After merge of PySide and shiboken, May 2017
            from PySide import shiboken
        extras.append("shiboken")
    except ImportError:
        pass

    _setup(module, extras)
    Qt.__binding_version__ = module.__version__

    if hasattr(Qt, "_shiboken"):
        Qt.QtCompat.wrapInstance = _wrapinstance
        Qt.QtCompat.getCppPointer = _getcpppointer
        Qt.QtCompat.delete = shiboken.delete

    if hasattr(Qt, "_QtUiTools"):
        Qt.QtCompat.loadUi = _loadUi

    if hasattr(Qt, "_QtGui"):
        setattr(Qt, "QtWidgets", _new_module("QtWidgets"))
        setattr(Qt, "_QtWidgets", Qt._QtGui)
        if hasattr(Qt._QtGui, "QX11Info"):
            setattr(Qt, "QtX11Extras", _new_module("QtX11Extras"))
            Qt.QtX11Extras.QX11Info = Qt._QtGui.QX11Info

        Qt.QtCompat.setSectionResizeMode = Qt._QtGui.QHeaderView.setResizeMode

    if hasattr(Qt, "_QtCore"):
        Qt.__qt_version__ = Qt._QtCore.qVersion()
        Qt.QtCompat.dataChanged = (
            lambda self, topleft, bottomright, roles=None:
            self.dataChanged.emit(topleft, bottomright)
        )

    _reassign_misplaced_members("PySide")
    _build_compatibility_members("PySide") 
Example #17
Source File: Qt.py    From NodeGraphQt with MIT License 4 votes vote down vote up
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
    extras = ["QtUiTools"]
    try:
        try:
            # Before merge of PySide and shiboken
            import shiboken2
        except ImportError:
            # After merge of PySide and shiboken, May 2017
            from PySide2 import shiboken2
        extras.append("shiboken2")
    except ImportError:
        pass

    _setup(module, extras)
    Qt.__binding_version__ = module.__version__

    if hasattr(Qt, "_shiboken2"):
        Qt.QtCompat.wrapInstance = _wrapinstance
        Qt.QtCompat.getCppPointer = _getcpppointer
        Qt.QtCompat.delete = shiboken2.delete

    if hasattr(Qt, "_QtUiTools"):
        Qt.QtCompat.loadUi = _loadUi

    if hasattr(Qt, "_QtCore"):
        Qt.__qt_version__ = Qt._QtCore.qVersion()
        Qt.QtCompat.dataChanged = (
            lambda self, topleft, bottomright, roles=None:
            self.dataChanged.emit(topleft, bottomright, roles or [])
        )

    if hasattr(Qt, "_QtWidgets"):
        Qt.QtCompat.setSectionResizeMode = \
            Qt._QtWidgets.QHeaderView.setSectionResizeMode

    _reassign_misplaced_members("PySide2")
    _build_compatibility_members("PySide2") 
Example #18
Source File: Qt.py    From dpAutoRigSystem with GNU General Public License v2.0 4 votes vote down vote up
def _pyside():
    """Initialise PySide"""

    import PySide as module
    extras = ["QtUiTools"]
    try:
        try:
            # Before merge of PySide and shiboken
            import shiboken
        except ImportError:
            # After merge of PySide and shiboken, May 2017
            from PySide import shiboken
        extras.append("shiboken")
    except ImportError:
        pass

    _setup(module, extras)
    Qt.__binding_version__ = module.__version__

    if hasattr(Qt, "_shiboken"):
        Qt.QtCompat.wrapInstance = _wrapinstance
        Qt.QtCompat.getCppPointer = _getcpppointer
        Qt.QtCompat.delete = shiboken.delete

    if hasattr(Qt, "_QtUiTools"):
        Qt.QtCompat.loadUi = _loadUi

    if hasattr(Qt, "_QtGui"):
        setattr(Qt, "QtWidgets", _new_module("QtWidgets"))
        setattr(Qt, "_QtWidgets", Qt._QtGui)
        if hasattr(Qt._QtGui, "QX11Info"):
            setattr(Qt, "QtX11Extras", _new_module("QtX11Extras"))
            Qt.QtX11Extras.QX11Info = Qt._QtGui.QX11Info

        Qt.QtCompat.setSectionResizeMode = Qt._QtGui.QHeaderView.setResizeMode

    if hasattr(Qt, "_QtCore"):
        Qt.__qt_version__ = Qt._QtCore.qVersion()
        Qt.QtCompat.dataChanged = (
            lambda self, topleft, bottomright, roles=None:
            self.dataChanged.emit(topleft, bottomright)
        )

    _reassign_misplaced_members("PySide")
    _build_compatibility_members("PySide")