Fonts
Fonts can be referenced via a font name (eg. "Courier"), loaded from a file, or a network url. The following snippet loads a font from the net and displays some text using it. The font loader also provides status information of the loading process. More info
Rectangle { width: 400; height: 200 FontLoader { id: webFont; source: "http://www.princexml.com/fonts/steffmann/Starburst.ttf" } Text { width: parent.width; font.family: webFont.name; font.pointSize: 30 text: { if (webFont.status == 1) "Font loaded" else if (webFont.status == 2) "Loading" else if (webFont.status == 3) "Error" } } }
转载:http://blog.chinaunix.net/uid-12664992-id-129935.html