Skip to main content

Material Symbols by Google for Qt using PySide

Project description

qt-material-icons

A Python library that enables Material Symbols / Material Icons by Google to be used in Qt using PySide.

Header

Installation

Install using pip:

pip install qt-material-icons

Usage

from PySide6 import QtGui
from qt_material_icons import MaterialIcon

# Create a QIcon object
icon = MaterialIcon('search')

# Set a color
color = QtGui.QColor('red')
icon.set_color(color)

# Set a color for a state, for example when a button is checked
icon.set_color(color, state=QtGui.QIcon.State.On)

# Set a different icon for a state, for example when a button is checked
toggle_icon = MaterialIcon('toggle_off')
toggle_icon_on = MaterialIcon('toggle_on')
toggle_icon.set_icon(toggle_icon_on, state=QtGui.QIcon.State.On)

Refer to Google Material Symbols & Icons for browsing icons.

Localize qt-material-icons

Since the qt-material-icons package is quite large with all the resource files, a cli is provided to extract specific icons so they can be shipped alongside the package.

Install as a dev dependency:

# pyproject.toml
[project.optional-dependencies]
dev = ["qt-material-icons"]

Use the cli to extract icons:

qtmaterialicons -o mypackage --styles outlined rounded --sizes 20 24 --names home computer search favorite

Then import in your repo:

from mypackage.qt_material_icons import MaterialIcon

Contributing

To contribute please refer to the Contributing Guide.

License

MIT License. Copyright 2024 - Beat Reichenbach. See the License file for details.

The Material Symbols / Material Icons are licensed under Apache License Version 2.0.

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

qt_material_icons-0.5.0.tar.gz (20.6 MB view details)

Uploaded Source

Built Distribution

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

qt_material_icons-0.5.0-py3-none-any.whl (21.2 MB view details)

Uploaded Python 3

File details

Details for the file qt_material_icons-0.5.0.tar.gz.

File metadata

  • Download URL: qt_material_icons-0.5.0.tar.gz
  • Upload date:
  • Size: 20.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for qt_material_icons-0.5.0.tar.gz
Algorithm Hash digest
SHA256 ea0e73c0f7299d5a01f6df3e2d65032575c2cb11c2334cf26eb370760a72ee45
MD5 913810ea2dda18726ca058a8c50f73ad
BLAKE2b-256 589ca46c5d3ee023f1cc1db86e942d45d06df6a07042f229ef97e75b0a873986

See more details on using hashes here.

Provenance

The following attestation bundles were made for qt_material_icons-0.5.0.tar.gz:

Publisher: publish.yml on beatreichenbach/qt-material-icons

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file qt_material_icons-0.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for qt_material_icons-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a71786eb211cd42fb640cfda2f6f7140065264d5b0ea97ad2bc63f5a0fc3dd83
MD5 ae1f156d0059a6214e26c282b673bf22
BLAKE2b-256 fd83afc510c27980bf7aeacd0ff5b93a99df423d06911d5c86f93a547914008c

See more details on using hashes here.

Provenance

The following attestation bundles were made for qt_material_icons-0.5.0-py3-none-any.whl:

Publisher: publish.yml on beatreichenbach/qt-material-icons

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 Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page