Skip to content

Usage of Material Icon font within QtQuick/QML applications

Notifications You must be signed in to change notification settings

eckertj/qml-material-icons

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Material Icons in QML

Usage of Material Icon font within QtQuick/QML applications

How to use

  1. Add fonts/MaterialIcons-Regular.ttf to your project
  2. Add MaterialDesign.js to your project and import file to use icon names
import "MaterialDesign.js" as MD
  1. Load font using Fontloader:
FontLoader {
	id: iconFont
    source: "../fonts/MaterialIcons-Regular.ttf"
}
  1. Use loaded font in Text element and set text by identifier (read from MaterialDesign.js)
Text {  
	font.family: iconFont.name
	font.pixelSize: 48
	text: MD.icons.beach_access
}

About

Usage of Material Icon font within QtQuick/QML applications

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published