Skip to main content

Collection of utilities for Qt applications

Project description

Utilities

Overview

A package for collecting utilities I usually use in my Qt-projects in Python. Some modules depend on others but some can be used on their own. Some modules might have stub files to assist development, but they always contain an initializer function to create the necassary stub files if they are missing when the module is first imported. The functionality of subclasses of QDialog are also available as subclasses of QDockWidget (floating, same-window dialogs). There are no set goals for this project other than having these things in one place, in a structured manner.

Contents

_general

General functions, classes etc. for internal use in other parts of the package. Modules usually depend on it.

colours

Adds the standard R colour palette to Qt applications. It provides a singleton object named Colours, with attribute access to all the colours of R's colors() function. These can be conveniently selected from a colour selector dialog, either from a drop-down list (by name) or from a grid (by visual selection). Based on this selector there is a colour scale creator dialog, where from a number of selected colours and set number of steps a colour scale can be defined for further use e.g. for plotting. It optionally uses theme: if the module can be imported, the dialogs can have a theme.

custom_file_dialog

Provides predefined file dialogs (PathTypes singleton) customized by a JSON file and a creator dialog. In the latter, a custom dialog could be defined, setting its type (source/destination), window title, dialog type (to open/save a file or open an existing directory), extension filter and associated path. Another function of these dialogs is to provide navigation history: if a path is successfully selected, the JSON file gets updated with it.

message

Provides predefined message boxes (MessageBoxType singleton) that can have a theme assigned (so it depends on theme) and a creator dialog. In the latter, a custom message box can be defined, setting it category (e.g. warning), window title and message (text content if the message box). A 'custom' category message box can also have its icon, buttons and flags set.

progress_dialog

Provides a cancellable, optionally nested progress dialog, reporting on a compatible process ran by a QObject-subclass on a separate thread. It also has a (package private) example of a compatible worker object. It optionally uses theme: if the module can be imported, it can use the preset themes.

theme

Provides a simple way to apply a predefined theme to Qt-widgets. It also adds a singleton object named WidgetTheme that has attribute access to all the defined themes. The set_widget_theme() function uses this singleton to select a theme.

theme_creator

Depends on theme and colours to provide a theme creator dialog. It provides a simple interface to edit and preview existing themes or to create new ones.

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

utils_qt_mk-1.0.1.tar.gz (47.6 kB view details)

Uploaded Source

Built Distribution

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

utils_qt_mk-1.0.1-py3-none-any.whl (53.8 kB view details)

Uploaded Python 3

File details

Details for the file utils_qt_mk-1.0.1.tar.gz.

File metadata

  • Download URL: utils_qt_mk-1.0.1.tar.gz
  • Upload date:
  • Size: 47.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for utils_qt_mk-1.0.1.tar.gz
Algorithm Hash digest
SHA256 bcd544e4df808ddb0ae69ae2fe3e0762d93f705a1268a31ca6c3b752e6fb2266
MD5 05ea8c4a066072b619dff8a1a3f071fa
BLAKE2b-256 8a088dd91578f14736d3cf1d576aae1cb64aaaaca20e91ec25dca3d14fcae24d

See more details on using hashes here.

File details

Details for the file utils_qt_mk-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: utils_qt_mk-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 53.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for utils_qt_mk-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 575b7321ea0a135f535c0e450f25f0189fbd523448b5b11d7ff078432ab68447
MD5 937811507e295a980872517dfec7f2ec
BLAKE2b-256 971c90af91792f035c9add284e813babc2be84749cd934dc675125b8d05ea9b3

See more details on using hashes here.

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