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/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/PySide6 agnostic interface to Qt that allows you to import qtutils.qt instead of PySide6 or PyQt5, 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.

  • 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.0.0.tar.gz (7.1 MB view details)

Uploaded Source

Built Distribution

qtutils-4.0.0-py3-none-any.whl (23.5 MB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for qtutils-4.0.0.tar.gz
Algorithm Hash digest
SHA256 578e00e298f20239b906cc1f39741de54d26df2495d5b7e8a740d94452bbc2b8
MD5 3f7eac329d9351d980adfe20c5b0c528
BLAKE2b-256 72898474372b9d19b0b12c4fa94f7fa852b4e68cdd585b2ac04844be1ea597ca

See more details on using hashes here.

Provenance

The following attestation bundles were made for qtutils-4.0.0.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.0.0-py3-none-any.whl.

File metadata

  • Download URL: qtutils-4.0.0-py3-none-any.whl
  • Upload date:
  • Size: 23.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for qtutils-4.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f6aec3b23a2a6fa95e7867cc410da48c4d935813bb43fa1a58715bb1634c101d
MD5 608e74cb30df63e81b79ad4276a59b87
BLAKE2b-256 af38300b6ab6b7abb374006aa5a2b529064a784049fee7b7e6c7795df166b94d

See more details on using hashes here.

Provenance

The following attestation bundles were made for qtutils-4.0.0-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 Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page