Provide the ability to use Material Design Icons Font in Qml elements
This repository is a bridge to use Material Design Icons Font in QML application.
Add this repository as a submodule to a folder named mdi in the root of your project using:
git submodule add https://github.com/alirezah95/Qml-Material-Design-Icons-Font mdi
or copy the all files to a folder named mdi in your project and use Mdi.qml to set Qml Item's font and text!
Note: If the contents are placed in another directory, update qmldir file based on the directory in which the contents are placed. See QML Modules for more detail.
- Since Qml
AbstractButtondoes not automatically render an html entity of a unicode value, for setting anAbstractButton's text useforButton()method of Mdi.qml. But forTextdirectly use the string properties inside Mdi.qml.
-
For
Textitems:import mdi 1.0 ... Text { font.family: Mdi.mdiFont.name textFormat: Text.RichText text: Mdi.eyeOff }
-
For
AbstractButtonderived items:import mdi 1.0 ... Button { font.family: Mdi.mdiFont.name text: Mdi.forButton(Mdi.eyeOff) }