Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

detect-qt-binding

A lightweight utility to automatically detect which Qt Python binding is available in your environment.

Features

  • Detects installed Qt bindings (PyQt6, PySide6, PyQt5, PySide2, PyQt4, PySide)
  • Checks both already imported modules and attempts to import available bindings
  • Returns a typed QtBindings enum value or None if no binding is found

Installation

pip install detect-qt-binding

Usage

from detect_qt_binding import detect_qt_binding, QtBindings

binding = detect_qt_binding()

if binding is None:
    print("No Qt binding found")
elif binding == QtBindings.PyQt6:
    print("PyQt6 detected")
# ... handle other cases

API Reference

detect_qt_binding() -> Optional[QtBindings]

Attempts to detect which Qt binding is available by:

  1. Checking already imported modules
  2. Attempting to import each known Qt binding

Returns:

  • A QtBindings enum member if a binding is found
  • None if no Qt binding is available

QtBindings Enum

Available values:

  • PyQt6
  • PySide6
  • PyQt5
  • PySide2
  • PyQt4
  • PySide

License

MIT License - Based on code from pyqtgraph (also MIT licensed)

Release files for detect-qt-binding 0.1.0a0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for detect-qt-binding 0.1.0a0
File Size Uploaded
detect_qt_binding-0.1.0a0.tar.gz 2.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for detect-qt-binding 0.1.0a0
File Interpreter ABI Platform
detect_qt_binding-0.1.0a0-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 6.0 kB

Release files / detect_qt_binding-0.1.0a0.tar.gz

Download URL detect_qt_binding-0.1.0a0.tar.gz
Size 2.9 kB
Tags Source
SHA-256 checksum
How to use checksums
2538bd30011a476579c6fd5a6cf5cb3719980e7ea68c79faf21e936f942fe078
BLAKE2b-256 checksum
How to use checksums
a17277498f91046aab18ada996963107ca5cefa4653e91ecee31d67a7db82df6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.2

Release files / detect_qt_binding-0.1.0a0-py2.py3-none-any.whl

Download URL detect_qt_binding-0.1.0a0-py2.py3-none-any.whl
Size 3.2 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
a8b806e98edc9d1821040ca7df7c2739feffd0f809c67920df4cd4576b3423b5
BLAKE2b-256 checksum
How to use checksums
cc0d61a4ae237cb825dbc97470c5416e8591666e60f8eadab7033228dffb7e9a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.2

Release history Release notifications | RSS feed

This release

0.1.0a0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page