diff options
author | Venugopal Shivashankar <venugopal.shivashankar@digia.com> | 2015-06-18 14:18:27 +0200 |
---|---|---|
committer | Venugopal Shivashankar <venugopal.shivashankar@digia.com> | 2016-01-06 09:12:25 +0000 |
commit | fb74dc47195605bb04f1ca7808009a0a3e747a16 (patch) | |
tree | 26b93541744bb62c2920b46c3053df60a87dc828 | |
parent | 540cf432c9cef3a0ca892d1b8c8d4a1364d825b0 (diff) | |
download | qtquickcontrols-fb74dc47195605bb04f1ca7808009a0a3e747a16.tar.gz |
Example: Update the textArea to reflect the color change
The DocumentHandler.textColor property is set to
colorDialog.color in the onAccepted handler. The safest
way is to bind the two properties instead of depending
on the onAccepted handler.
Task-number: QTBUG-36593
Change-Id: I589ab3b3f8e8189199740d896ebae3717d5022b3
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
-rw-r--r-- | examples/quick/controls/texteditor/qml/main.qml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/quick/controls/texteditor/qml/main.qml b/examples/quick/controls/texteditor/qml/main.qml index cefbf434..42f5e7f9 100644 --- a/examples/quick/controls/texteditor/qml/main.qml +++ b/examples/quick/controls/texteditor/qml/main.qml @@ -169,7 +169,6 @@ ApplicationWindow { ColorDialog { id: colorDialog color: "black" - onAccepted: document.textColor = color } Action { @@ -333,6 +332,7 @@ ApplicationWindow { cursorPosition: textArea.cursorPosition selectionStart: textArea.selectionStart selectionEnd: textArea.selectionEnd + textColor: colorDialog.color Component.onCompleted: document.fileUrl = "qrc:/example.html" onFontSizeChanged: { fontSizeSpinBox.valueGuard = false |