Skip to main content

No project description provided

Project description

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')))

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

qtico-0.2.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

qtico-0.2-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file qtico-0.2.tar.gz.

File metadata

  • Download URL: qtico-0.2.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for qtico-0.2.tar.gz
Algorithm Hash digest
SHA256 c10a33df2ffbcceda605660d815b9030c5f759afa5329722192d7aa8f0ec8c09
MD5 0aedb5dd76c7d146d282d45e4a5584dd
BLAKE2b-256 d7232fa59e0153e2135c7260442a1d8a28f62b3d80327b52a879ce1b692d1eda

See more details on using hashes here.

File details

Details for the file qtico-0.2-py3-none-any.whl.

File metadata

  • Download URL: qtico-0.2-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for qtico-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 35e0ab41db711f9cfebc21c5a0e00eaf7a1bcb24be1548bb203f4c716bf4f64d
MD5 102a6619e845be8736638428da244e20
BLAKE2b-256 efba8a905ca44cffc44a4831395acf64896a865dfcfdd0b4b80ef3ca40b2100f

See more details on using hashes here.

Supported by

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