Skip to main content
Pre-release

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

qtcompat

A compatibility package to allow usage of PySide2, PyQt5 or PySide6 in Python applications. It has been written in OGS to allow our Python applications written in PyQt4 / PySide to migrate slowly to PyQt5 / Pyside2 and PySide6.

Install qtcompat

Run command:

pip3 install qtcompat 

For the bleeding edge install with:

pip3 install git+https://bitbucket.org/bvidmar/qtcompat

Usage

When writing a new package import all the modules required by it in its init.py file:

from qtcompat import (Signal, QtCore, Qt, QtGui, QtWidgets, LIB,                
    QAction, QShortcut)

and then import only the Qt modules needed by every new module from .

To write a single scrpit simply import the required modules from qtcompat:

from qtcompat import QtCore, QtGui, QtWidgets

Write applications using:

- QtCore
- QtGui
- QtWidgets
- QtOpenGL
- Signal
- Slot
- Property
- QOpenGLWidget
- QGLFormat
- QAction
- QShortcut
- Qt (shortcut for QtCore.Qt)

and the application will work with any of PySide2, PyQt5 or PySide6.

If more than one of these packages are installed qtcompat will pick the first one available in this order. To change this behaviour set the environment variable

QT_PREFERRED_LIB=PyQt5

or

QT_PREFERRED_LIB=PySide6

The selected package name will be available in the LIB attribute of qtcompat.

Who do I talk to?

Metadata

Release files for qtcompat 0.0.1a0

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

Source distribution (sdist)

Source distribution for qtcompat 0.0.1a0
File Size Uploaded Provenance
qtcompat-0.0.1a0.tar.gz 4.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for qtcompat 0.0.1a0
File Interpreter ABI Platform
qtcompat-0.0.1a0-py3-none-any.whl Python 3 none any Details

Total release size: 7.7 kB

Release files / qtcompat-0.0.1a0.tar.gz

Download URL qtcompat-0.0.1a0.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
104ad3029b47d85d42bbf442ae3150ad85542ed1d6ec7958bcdee0c5757d3a82
BLAKE2b-256 checksum
How to use checksums
721360f05bd68cf84a427188c97eed5376dfe9236acfaedd65b625569afc0011
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.3.0 pkginfo/1.5.0.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.5

Release files / qtcompat-0.0.1a0-py3-none-any.whl

Download URL qtcompat-0.0.1a0-py3-none-any.whl
Size 3.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c83d2754f188902a31b678a3da84580c8a5d9962002f61359d1ebcafef3341f4
BLAKE2b-256 checksum
How to use checksums
8f30008f04bd3c8a8a12ffe1337f784af823c7fcf9e5b998e2882e65c38720ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.3.0 pkginfo/1.5.0.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.5

Security for qtcompat 0.0.1a0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release
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