diff options
author | Shawn Rutledge <[email protected]> | 2023-12-13 11:11:57 -0700 |
---|---|---|
committer | Shawn Rutledge <[email protected]> | 2025-04-28 19:33:13 +0200 |
commit | 9cd4e29afd680972d7531ec4bfff12661b71c81f (patch) | |
tree | 7f6643df79fa9fc18e883ae539c4e08f52ab0c80 | |
parent | 272368cbf0a4f164566a8defbeaedc70c1f9f618 (diff) |
Improve QML in Controls TextEditor example
Pick-to: 6.8 6.9
Task-number: QTBUG-119988
Change-Id: Iffc7df85f25024301efef591eb3fbfb1cfbe2f17
Reviewed-by: Oliver Eftevaag <[email protected]>
-rw-r--r-- | examples/quickcontrols/texteditor/qml/texteditor.qml | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/examples/quickcontrols/texteditor/qml/texteditor.qml b/examples/quickcontrols/texteditor/qml/texteditor.qml index 0ef3937468..cb351aab04 100644 --- a/examples/quickcontrols/texteditor/qml/texteditor.qml +++ b/examples/quickcontrols/texteditor/qml/texteditor.qml @@ -1,10 +1,9 @@ // Copyright (C) 2021 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause -import QtQuick import QtCore +import QtQuick import QtQuick.Controls -import QtQuick.Window import QtQuick.Dialogs // TODO: @@ -18,11 +17,6 @@ ApplicationWindow { title: textArea.textDocument.source + " - Text Editor Example" + (textArea.textDocument.modified ? " *" : "") - Component.onCompleted: { - x = Screen.width / 2 - width / 2 - y = Screen.height / 2 - height / 2 - } - Action { id: openAction text: qsTr("&Open") @@ -270,7 +264,7 @@ ApplicationWindow { ColorDialog { id: colorDialog - selectedColor: "black" + selectedColor: textArea.cursorSelection.color onAccepted: textArea.cursorSelection.color = selectedColor } @@ -304,10 +298,7 @@ ApplicationWindow { } header: ToolBar { - leftPadding: 8 - Flow { - id: flow width: parent.width Row { |