QtMDI (Qt Material Design Icons)
Project description
QtMDi (Qt Material Design icons)
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:
mds
prefix has Google material design icons symbols stylemdf
prefix has Google material design icons variablefont style
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 unsupportedOptical size
property currently unsupported
License
- MIT License. Copyright 2023 Yaroshenko Dmytro (https://github.com/o-murphy) See the LICENSE file for details.
-
The Google material design icons fonts is licensed under the Apache License Version 2.0.
-
The material-symbols package is licensed under the Apache License Version 2.0.
-
The QtAwesome licensed under the MIT License. Copyright 2015 - The Spyder development team. See the LICENSE file for details.
-
The Font Awesome and Elusive Icons fonts are licensed under the SIL Open Font License.
-
The Phosphor font is licensed under the MIT License.
-
The Material Design Icons font is licensed under the Apache License Version 2.0.
-
The Remix Icon font is licensed under the Apache License Version 2.0.
-
Microsoft's Codicons are licensed under a Creative Commons Attribution 4.0 International Public License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file qtmdi-1.1.27.tar.gz
.
File metadata
- Download URL: qtmdi-1.1.27.tar.gz
- Upload date:
- Size: 27.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5042d64b46b05b2d109318979a9ec5266e9080fb1e7b74ba725059f744eb77f |
|
MD5 | bb6d8ef6505b01afe57943514322b910 |
|
BLAKE2b-256 | 7ac09793f14ed132737d0726bf5a59c99ec1a3795ded3b00c2602615ea669c92 |
Provenance
The following attestation bundles were made for qtmdi-1.1.27.tar.gz
:
Publisher:
python-publish.yml
on o-murphy/QtMDi
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
qtmdi-1.1.27.tar.gz
- Subject digest:
e5042d64b46b05b2d109318979a9ec5266e9080fb1e7b74ba725059f744eb77f
- Sigstore transparency entry: 149207383
- Sigstore integration time:
- Predicate type:
File details
Details for the file QtMDi-1.1.27-py3-none-any.whl
.
File metadata
- Download URL: QtMDi-1.1.27-py3-none-any.whl
- Upload date:
- Size: 27.2 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9594f1d45c9bb8683bb273d24ace45d208d222577f285a772c5d013be22ee4c |
|
MD5 | 7b1528da14d5fcd22dc02676d57bd928 |
|
BLAKE2b-256 | 626691530705bb671e7b5d7d70d2bf43b99d06da557d0f0654a5934e3e724abd |
Provenance
The following attestation bundles were made for QtMDi-1.1.27-py3-none-any.whl
:
Publisher:
python-publish.yml
on o-murphy/QtMDi
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
qtmdi-1.1.27-py3-none-any.whl
- Subject digest:
d9594f1d45c9bb8683bb273d24ace45d208d222577f285a772c5d013be22ee4c
- Sigstore transparency entry: 149207385
- Sigstore integration time:
- Predicate type: