Basic font rendering now working nicely.
2 import QtQuick.Controls 1.2
3 import QtQuick.Dialogs 1.1
4 import QtQuick.Layouts 1.1
5 import Qt.labs.settings 1.0
10 //SystemPalette { id: palette }
16 property alias font: textFontDemoLowerCase.font;
24 modality: Qt.WindowModal
25 scalableFonts: fontDialogScalableFonts.checked
26 nonScalableFonts: fontDialogNonScalableFonts.checked
27 monospacedFonts: fontDialogMonospacedFonts.checked
28 proportionalFonts: fontDialogProportionalFonts.checked
29 title: qsTr("Choose a font")
30 font: textFontDemoLowerCase.font
31 currentFont: textFontDemoLowerCase.font
32 onCurrentFontChanged: { console.log("CurrentFontChanged: " + currentFont) }
33 onFontChanged: { console.log("FontChanged: " + font) }
35 console.log("Accepted: " + font);
36 textFontDemoLowerCase.font = currentFont;
37 display.font = currentFont;
38 //textFontDemoUpperCase.font = currentFont;
39 //textFontDemoDigits.font = currentFont;
41 onRejected: { console.log("Rejected") }
51 text: "Current font: <b>" + textFontDemoLowerCase.font.family + " - " + textFontDemoLowerCase.font.pointSize +"</b>"
54 onClicked: fontDialog.open()
63 id: textFontDemoLowerCase
65 text: "abcdefghijklmnopqrstyvwxyz"
66 font: Qt.font({ family: "Arial", pointSize: 16, weight: Font.Normal })
70 id: textFontDemoUpperCase
72 text: "ABCDEFGHIJKLMNOPQRSTYVWXYZ"
73 font: textFontDemoLowerCase.font
77 id: textFontDemoDigits
80 font: textFontDemoLowerCase.font
84 //Font selection options
91 id: fontDialogScalableFonts
92 text: "Scalable fonts"
93 Binding on checked { value: fontDialog.scalableFonts }
96 id: fontDialogNonScalableFonts
97 text: "Non scalable fonts"
98 Binding on checked { value: fontDialog.nonScalableFonts }
101 id: fontDialogMonospacedFonts
102 text: "Monospaced fonts"
103 Binding on checked { value: fontDialog.monospacedFonts }
106 id: fontDialogProportionalFonts
107 text: "Proportional fonts"
108 Binding on checked { value: fontDialog.proportionalFonts }
115 text: qsTr("Change font")
116 onClicked: fontDialog.open()