Skip to main content

qtutils

Actions Status GitHub release Python Version Documentation Status PyPi Version Conda Version PyPi License

Utilities for providing concurrent access to Qt objects, simplified QSettings storage, and dynamic widget promotion when loading UI files, in Python Qt applications. Includes the Fugue icon set, free to use with attribution to Yusuke Kamiyamane, and the Ubuntu font family (available under the Ubuntu font license).

Installation

  • To install the latest release version, run pip install qtutils.

  • To install latest development version, clone the GitHub repository and run pip install . to install, or pip install -e . to install in 'editable' mode.

Summary

qtutils is a Python library that provides some convenient features to Python applications using the PyQt5/PyQt6/PySide6 widget library.

qtutils 4.0 dropped support for PySide2. If you need to use PySide2, you may use qtutils 3.1.0 or earlier.

qtutils contains the following components:

  • invoke_in_main: This provides some helper functions to interact with Qt from threads.

  • UiLoader: This provides a simplified means of promoting widgets in *.ui files to a custom widget of your choice.

  • qsettings_wrapper: A wrapper around QSettings which allows you to access keys of QSettings as instance attributes. It also performs automatic type conversions.

  • icons: An icon set as a QResource file and corresponding Python module. The resulting resource file can be used by Qt designer, and the python module imported by applications to make the icons available to them. The Fugue icon set was made by Yusuke Kamiyamane, and is licensed under a Creative Commons Attribution 3.0 License. If you can't or don't want to provide attribution, please purchase a royalty-free license from http://p.yusukekamiyamane.com/ Each icon is a 16×16 image with a 32×32 variant for high DPI displays. qtutils.icons.Icon(':/qtutils/fugue/tick') is a QIcon with both images, drawn from the 32×32 one on a high DPI screen, including a screen attached after the application started; QIcon(path) has the 32×32 image only if a high DPI screen is attached when it is made. UiLoader sets the icons of a .ui file in the same way.

  • iconlabel: IconLabel, a widget that displays a QIcon in place of a QLabel with a pixmap, so that the icon is drawn from the image for the screen that the widget is on. In Qt designer, promote a QWidget to IconLabel with the header qtutils/widgets.h.

  • qt: a PyQt5/PyQt6/PySide6 agnostic interface to Qt that allows you to do e.g from qtutils.qt import QtCore, QtGui, QtWidgets instead of specifying PySide6 or PyQt5/PyQt6, and have your code use whichever Qt library is available, with some convenience aliases to make it easier to write code that works with the different libraries. Note that this is not a comprehensive abstraction layer like QtPy and your code will still need to be written in a way generally compatible with the libraries you want to support. qtutils does provide aliases for short enums in PyQt6, however, which is one of the most singificant differences between PyQt6 and PySide6/PyQt5. qtutils.qt will choose which Qt library to use based on a) if the QT_ENV environment variable is set to PyQt5, PySide6, or PyQt6, otherwise whichever library has already been imported, or if none, whichever is installed, with order of priority PyQt5, PySide6, then PyQt6.

  • outputbox: a QTextEdit widget for displaying log/output text of an application, either by calling methods or by sending data to it over zeromq.

  • fonts: bundled fonts from the Ubuntu font family - call qtutils.fonts.load_fonts() after instantiating a QApplication to add them to the Qt font database and make them available to your application.

Using icons with Qt designer

To use the icons from Qt designer, clone this repository, and point Qt designer to the .qrc file for the icons set: icons/icons.qrc. Unfortunately Qt desginer saves the absolute path to this file in the resulting .ui file, so if the .ui file is later edited by someone on another system, they will see an error at startup saying the .qrc file cannot be found. This can be ignored and the .ui file will still function correctly, but Qt designer will need to be told the local path to the .qrc file before it can display the icons within its interface.

Metadata

Release files for qtutils 4.4.2

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

Source distribution (sdist)

Source distribution for qtutils 4.4.2
File Size Uploaded Provenance Actions
qtutils-4.4.2.tar.gz 9.4 MB With provenance Details for qtutils-4.4.2.tar.gz

Built distribution (wheel)

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

Total release size: 21.0 MB

Release files / qtutils-4.4.2.tar.gz

Download URL qtutils-4.4.2.tar.gz
Size 9.4 MB
Tags Source
SHA-256 checksum
How to use checksums
7d78624de09fb73b9f43e88d4e96ced24d008ded20533ba33d007af32421b3b7
BLAKE2b-256 checksum
How to use checksums
74b81210b69c5e80e6a9f4e3111c7995e5bb24aea7def006ccc34108426a085b
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 Oct 30, 2026.

Transparency log

Release files / qtutils-4.4.2-py3-none-any.whl

Download URL qtutils-4.4.2-py3-none-any.whl
Size 11.6 MB
Tags Python 3
SHA-256 checksum
How to use checksums
8a569fe5fd2f179f2fa415e835d1cfdf07e0ba2ab51301601025aabf7fb13152
BLAKE2b-256 checksum
How to use checksums
6c7113eab3baade786c281d7a0ebe4eaa69e3cd7ffc8cffbf9f82c8ec16d493e
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 Oct 30, 2026.

Transparency log

Security for qtutils 4.4.2

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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for qtutils-4.4.2.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 Oct 30, 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

4.4.2 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