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.0.tar.gz (15.2 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.0-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: utils_qt_mk-1.0.0.tar.gz
  • Upload date:
  • Size: 15.2 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.0.tar.gz
Algorithm Hash digest
SHA256 2ba7c7c73ccc5d08e5b619a0be173b79072afd8b56bd7f6fdfe2e6625a905f89
MD5 8c4576bd50e2864edbe87cfb01ebb663
BLAKE2b-256 657cd2ef290a4592725a38a71620dd4086120c6e4be9bc604fdd2b823db379a0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: utils_qt_mk-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 15.1 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6f2e016a251cfc4a83e730d76ef76e4a5bcad5a99672cdcf52785de0c2cf3905
MD5 a264d8e09e9a649925952589a8a5a559
BLAKE2b-256 2aad4c6191507865ecb61d2b1a7ee8aa5e449a9c0fb287a0fc2562e18f05d285

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