PyQt5 SIP Module Support

12.18.0 · active · verified Fri Apr 10

The `pyqt5-sip` package provides the SIP module, which is essential support for PyQt5. SIP is a powerful tool for creating Python bindings for C and C++ libraries, originally developed for the Qt toolkit. The current version is 12.18.0, with ongoing maintenance releases to ensure compatibility and provide bug fixes.

Warnings

Install

Imports

Quickstart

The `pyqt5-sip` package provides the underlying support for PyQt5. A typical PyQt5 application implicitly uses `sip` for its C++/Python bindings. This quickstart demonstrates a basic PyQt5 window, confirming that `pyqt5-sip` is correctly installed and supporting your PyQt5 environment.

import sys
from PyQt5.QtWidgets import QApplication, QLabel, QWidget
from PyQt5.QtCore import Qt

# This simple PyQt5 app implicitly relies on pyqt5-sip
# for its underlying C++/Python bindings.

def main():
    app = QApplication(sys.argv)

    window = QWidget()
    window.setWindowTitle("PyQt5 SIP Check")
    window.setGeometry(100, 100, 300, 200)

    label = QLabel("Hello, PyQt5 with SIP!", window)
    label.setAlignment(Qt.AlignCenter)
    label.setGeometry(0, 0, 300, 200)

    window.show()
    sys.exit(app.exec_())

if __name__ == "__main__":
    main()

view raw JSON →