Skip to main content

PySide6/PyQt5 abstraction layer, mulithreading and UI loader utilities, icon set, and more

Project description

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/

  • Qt: a PyQt5/PyQt6/PySide6 agnostic interface to Qt that allows you to import qtutils.qt instead of PySide6 or PyQt5/6, and have your code run on both, with some convenience aliases to make it easier to write code that works with both 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 both libraries if you want to support both. qtutils does provide aliases for short enums in PyQt6, however, which is one of the most singificant differences between PySide6 and 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qtutils-4.1.1.tar.gz (7.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qtutils-4.1.1-py3-none-any.whl (9.3 MB view details)

Uploaded Python 3

File details

Details for the file qtutils-4.1.1.tar.gz.

File metadata

  • Download URL: qtutils-4.1.1.tar.gz
  • Upload date:
  • Size: 7.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for qtutils-4.1.1.tar.gz
Algorithm Hash digest
SHA256 4548e44aa8e9817b76424c7f1b341e4f9eef0f3c3dc20e029ef86e5a6f732e19
MD5 9a87a5bff46ac2b58a57d21edce228e4
BLAKE2b-256 fe4f3c4290db30a6c914de7ee4a82e03aa4ae21587e6f7b7f3a15661c406e298

See more details on using hashes here.

Provenance

The following attestation bundles were made for qtutils-4.1.1.tar.gz:

Publisher: release.yml on philipstarkey/qtutils

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qtutils-4.1.1-py3-none-any.whl.

File metadata

  • Download URL: qtutils-4.1.1-py3-none-any.whl
  • Upload date:
  • Size: 9.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for qtutils-4.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 caecfb3804a56bd818b2a8febdb70de307c01f8e631890621638bcbb30a831a5
MD5 061cc69b6f5adeedf7a323e6a38196e4
BLAKE2b-256 af05db76d829615aea6454f1481a98a448f7c9d9462a054b6f0c7e09c46944bf

See more details on using hashes here.

Provenance

The following attestation bundles were made for qtutils-4.1.1-py3-none-any.whl:

Publisher: release.yml on philipstarkey/qtutils

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page