Skip to main content

PrettyQt: Pythonic layer on top of PyQt6 / PySide6

PyPI Latest Release Package Status License CodeCov Ruff

PrettyQt wraps the complete Qt 6 API (on top of either PyQt6 or PySide6) and makes it feel like a native Python library: snake_case helpers, strings instead of enums, sensible type conversions, __dunder__ methods and many ready-made widgets and models. The original Qt API keeps working, so you can adopt it incrementally.

Documentation: https://phil65.github.io/PrettyQt/

Installation

PrettyQt needs a Qt binding; pick one via extras:

pip install "prettyqt[pyside6]"   # or: pip install "prettyqt[pyqt6]"
pip install "prettyqt[pyside6,addons]"   # optional extras (fsspec, pillow, numpy, qtconsole, ...)

If both bindings are installed, set QT_API=pyside6 or QT_API=pyqt6 to choose.

Quickstart

from prettyqt import core, custom_widgets, widgets

app = widgets.app()

window = widgets.Widget(window_title="PrettyQt demo")
layout = window.set_layout("vertical", margin=10)

checkbox = widgets.CheckBox("Enable feature")
checkbox.set_checkstate("partial")  # strings instead of enums
assert checkbox.get_checkstate() == "partial"
assert checkbox.checkState() == core.Qt.CheckState.PartiallyChecked  # Qt API still works

button = widgets.PushButton("Click me", icon="mdi.thumb-up")  # icon by name
button.clicked.connect(lambda: print("clicked!"))

layout.add(checkbox)
layout.add(button)
layout.add(custom_widgets.ColorComboBox())

window.show()
app.exec()

Every Qt module has a lowercase counterpart without the Qt prefix (QtCore → prettyqt.core, QtWidgets → prettyqt.widgets, ...), and every class one without the Q prefix (QWidget → widgets.Widget). The original Qt classes stay available in the same module (widgets.QWidget).

Main features

  • Subclasses for almost all Qt classes, enriched with helper and __dunder__ methods.
  • Setters/getters accepting strings for enums (set_checkstate("checked")), typed with Literals.
  • Constructor kwargs in snake_case, with string-to-enum mapping (widgets.Widget(window_modality="window")).
  • About 80 additional widgets and layouts (prettyqt.custom_widgets).
  • More than 30 item models and 25 proxy models (prettyqt.itemmodels).
  • Item delegates, validators, event filters, animations and syntax highlighters.
  • Icon fonts (Material Design Icons, FontAwesome, ...) via prettyqt.iconprovider.
  • Works with PyQt6 and PySide6 through a single, QtPy-like binding layer.

License

MIT

Metadata

Release files for PrettyQt 1.65.0

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

Source distribution (sdist)

Source distribution for PrettyQt 1.65.0
File Size Uploaded Provenance Actions
prettyqt-1.65.0.tar.gz 4.4 MB With provenance Details for prettyqt-1.65.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for PrettyQt 1.65.0
File Interpreter ABI Platform Actions
prettyqt-1.65.0-py3-none-any.whl Python 3 none any Details for prettyqt-1.65.0-py3-none-any.whl

Total release size: 9.2 MB

Release files / prettyqt-1.65.0.tar.gz

Download URL prettyqt-1.65.0.tar.gz
Size 4.4 MB
Tags Source
SHA-256 checksum
How to use checksums
d6890a1346f832b29709361ccda074dd486b2aa27b9da939ab0d21f72b5635ee
BLAKE2b-256 checksum
How to use checksums
55bf84a03aec1be26ae2054a42eca02307fadc93cc8cc2cd04c857194267578b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

Release files / prettyqt-1.65.0-py3-none-any.whl

Download URL prettyqt-1.65.0-py3-none-any.whl
Size 4.8 MB
Tags Python 3
SHA-256 checksum
How to use checksums
4cf3aa60b604ddaf773b5f73618fd573fbd0ee833b35388c7fd97df32c0abf32
BLAKE2b-256 checksum
How to use checksums
dc348eb64cbe3cbd1a03b00220afc030d1dfdcb779e3c1d67bac6bfe03e854f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

Security for PrettyQt 1.65.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for prettyqt-1.65.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.65.0 This release

2 release files Full provenance

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