summaryrefslogtreecommitdiffstats
path: root/examples/quick/dialogs/systemdialogs
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@digia.com>2014-02-03 06:49:28 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-03 12:18:36 +0100
commita1df3e8537b7474db08e81bd1f0faebb13caebf4 (patch)
tree882c6215ccad563f05024c197100679733455021 /examples/quick/dialogs/systemdialogs
parent0bbb32469adb3c49b110e2eb987caba58da80554 (diff)
Add currentFont property to FontDialog.
QFontDialog has this property. This patch effectively means that the font property will be set when the dialog closes, instead of whenever the current font in the dialog changes, so pressing cancel will revert the font to what it was before the dialog was opened. Align with e73d503b84be12e7bf28491356b459ca309e7c95 in qtdelarative, the similar change for color dialog. [ChangeLog][QtQuickControls][FontDialog] Added currentFont property. Task-number: QTBUG-36574 Change-Id: I4140966543a677d8e654dbaac170a2fe8d3579a1 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Diffstat (limited to 'examples/quick/dialogs/systemdialogs')
-rw-r--r--examples/quick/dialogs/systemdialogs/FontDialogs.qml2
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/quick/dialogs/systemdialogs/FontDialogs.qml b/examples/quick/dialogs/systemdialogs/FontDialogs.qml
index 3eac625e1..9770047c7 100644
--- a/examples/quick/dialogs/systemdialogs/FontDialogs.qml
+++ b/examples/quick/dialogs/systemdialogs/FontDialogs.qml
@@ -58,6 +58,8 @@ Item {
proportionalFonts: fontDialogProportionalFonts.checked
title: "Choose a font"
font: Qt.font({ family: "Arial", pointSize: 24, weight: Font.Normal })
+ currentFont: Qt.font({ family: "Arial", pointSize: 24, weight: Font.Normal })
+ onCurrentFontChanged: { console.log("CurrentFontChanged: " + currentFont) }
onAccepted: { console.log("Accepted: " + font) }
onRejected: { console.log("Rejected") }
}