Skip to main content

SWUbanner

QtMDi (Qt Material Design icons)

license pypi version

Copyright 2023 Yaroshenko Dmytro (https://github.com/o-murphy)

The extension for QtAwesome with the latest variable icon fonts for Material Symbols

(Python 3, PySide, PyQt)

[!NOTE] Fonts in this package automatically updated, so it will always have the latest icons from Google

[!NOTE] The package is publishing to PyPi automatically, so it can have issues in some releases

[!NOTE] The package uses QtAwesome as it's backend, so it support all the feature provided by QtAwesome, for more see the docs

Installation

Install the [latest release][releases] from PyPi using:

pip install QtMDi

Install the latest updated version from github:

pip install https://github.com/o-murphy/QtMDi

Usage

Supported Fonts

QtAwesome identifies icons by their prefix and their icon name, separated by a period (.) character.

The following prefixes are currently available to use:

Example

Import qtawesome and qtmdi in your python file:

import qtawesome
import qtmdi

Icon creation example

# basic rounded
qtawesome.icon("mds-rounded-base.home")

# rounded with 700 width
qtawesome.icon("mds-rounded-700.home")

# rounded with 400 width
qtawesome.icon("mds-sharp-400.home")

# basic variablefont ttf based icon
qtawesome.icon("mdf-sharp.home")

Create an app

from qtpy import QtWidgets

class Example(QtWidgets.QMainWindow):
    def __init__(self):
        super().__init__()
        self.lt = QtWidgets.QVBoxLayout(self)
        self.btn = QtWidgets.QToolButton(self)
        self.btn.setIcon(
            qtawesome.icon("mdi-rounded-700.home_filled"),
        )
        self.btn.setFixedSize(48, 48)
        self.btn.setIconSize(32, 32)
        self.lt.addWidget(self.btn)

Load extension on your app instance

import sys
from qtpy import QtWidgets
import qtawesome
import qtmdi


# Create an app
class Example(QtWidgets.QMainWindow):
    def __init__(self):
        super().__init__()
        self.lt = QtWidgets.QVBoxLayout(self)
        self.btn = QtWidgets.QToolButton(self)
        self.btn.setIcon(
            qtawesome.icon("mds-rounded-700.home"),
        )
        self.btn.setFixedSize(48, 48)
        self.btn.setIconSize(32, 32)
        self.lt.addWidget(self.btn)
        
def run():
    app = QtWidgets.QApplication()
    
    # Load extension on your app instance
    qtmdi.load(app)
    
    qtawesome.dark(app)
    w = Example()
    w.show()
    sys.exit(app.exec_())
        
if __name__ == '__main__':    
    run()

Available Icons

To see available icons run qtmdi-browser in your terminal

qtmdi-browser

Known issues

  • Filled icons not shown as expected
  • Grade property currently unsupported
  • Optical size property currently unsupported

License

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qtmdi-1.1.81.tar.gz (32.0 MB view details)

Uploaded Source

Built Distribution

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

qtmdi-1.1.81-py3-none-any.whl (32.1 MB view details)

Uploaded Python 3

File details

Details for the file qtmdi-1.1.81.tar.gz.

File metadata

  • Download URL: qtmdi-1.1.81.tar.gz
  • Upload date:
  • Size: 32.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for qtmdi-1.1.81.tar.gz
Algorithm Hash digest
SHA256 f3cb0055c8ec9cf8a9c62a59b59c3b4da1cb39713cb94ed0cf796a5bd401a720
MD5 6c6d2b9bdb01fd98bc0f84916432863b
BLAKE2b-256 1c0e20d6fe6388b39eb95b633b75fda5a4b24cb8e7b9c3e27eb2bec070b46fe0

See more details on using hashes here.

Provenance

The following attestation bundles were made for qtmdi-1.1.81.tar.gz:

Publisher: python-publish.yml on o-murphy/QtMDi

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

File details

Details for the file qtmdi-1.1.81-py3-none-any.whl.

File metadata

  • Download URL: qtmdi-1.1.81-py3-none-any.whl
  • Upload date:
  • Size: 32.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for qtmdi-1.1.81-py3-none-any.whl
Algorithm Hash digest
SHA256 4e7396731080f2c637ecbd33410f02f21ece83ee3ab64ef40890ac10873ac00a
MD5 c05be99844a43233a961c07faaac67af
BLAKE2b-256 ee4eb27443c7e8c7c98195e1bf7bda82f95331f62a28ad60cb1252178c18f315

See more details on using hashes here.

Provenance

The following attestation bundles were made for qtmdi-1.1.81-py3-none-any.whl:

Publisher: python-publish.yml on o-murphy/QtMDi

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

Release history Release notifications | RSS feed

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page