Skip to main content

This package provides tools to manage PyQt icon themes.

The QIcon.fromTheme API works with icon themes following the freedesktop icon theme spec, which is great for Linux systems with installed and enabled themes, but not for Windows or OS X, which lack them.

To benefit, you just have to create a theme directory with the right structure and use this package’s functions:

icons (The default directory name)
├hicolor
│├16x16/apps/myapp.png
│├32x32/apps/myapp.png
│┆
│└scalable/apps/myapp.svg
└mypackage-builtin
 ├16x16
 │├actions
 ││├document-open.png
 ││┆
 │├mimetypes
 ││├application-x-mymime.png
 ┆┆┆

This package provides the following functions to ease bundling an in-memory icon theme for those systems:

write_theme_indices

Creates .index.theme files from the .png and .svg files.

write_resources

Create a .qrc and _rc.py file to import the icon data from. (Needs the .index.theme files)

write_iconset

Creates a iconset folder for OSX apps, e.g. via py2app, using the hicolor/<s>x<s>/apps/myapp.png files.

install_icon_theme

To be used in a running application to make the builtin icons available.

The hicolor/<s>x<s>/apps/myapp.png files can be

  1. installed to the system by packagers (/usr/share/icons/hicolor/…)

  2. subsequently used in a .desktop file (Icon=myapp)

  3. used as window icon (self.setWindowIcon(QIcon.fromTheme('myapp')))

Metadata

Release files for qtico 0.2.1

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

Source distribution (sdist)

Source distribution for qtico 0.2.1
File Size Uploaded
qtico-0.2.1.tar.gz 7.2 kB Details

Built distribution (wheel)

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

Total release size: 14.1 kB

Release files / qtico-0.2.1.tar.gz

Download URL qtico-0.2.1.tar.gz
Size 7.2 kB
Tags Source
SHA-256 checksum
How to use checksums
067b882aabf69e60ec0d45b21aee5556a79ea01ffc6f828caea3a6c8e8d2a2bb
BLAKE2b-256 checksum
How to use checksums
c6dc7918761f2f46c2ad79e670aa30f24f85e06f7bda59f232e1ebfd768eb862
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

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 Feb 12, 2025.

Transparency log

Release files / qtico-0.2.1-py3-none-any.whl

Download URL qtico-0.2.1-py3-none-any.whl
Size 6.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
19d5e81ab75fbc64af5d7f46bd308634aa8fa43833074fcba2581829857f94db
BLAKE2b-256 checksum
How to use checksums
4975c0cfe925f437e1c00bd487530a4b1d0807d7feb8e533594d524f9027168e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

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 Feb 12, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2

2 release files

0.1

2 release files

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