aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/quickcontrols/texteditor/qml/texteditor.qml13
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 {