diff options
author | Oliver Eftevaag <oliver.eftevaag@qt.io> | 2021-08-23 11:27:37 +0200 |
---|---|---|
committer | Oliver Eftevaag <oliver.eftevaag@qt.io> | 2021-08-27 17:09:48 +0200 |
commit | 8976c46f46e4559913948748148ce42c33a6c138 (patch) | |
tree | 319e67c5c176982a85f0c87ad3f20da4bf9c270b /examples/quick/externaldraganddrop/DragAndDropTextItem.qml | |
parent | 409019bc1185b605a6a3e1f1ab474117d5ce0055 (diff) |
ExternalDragAndDrop example: Use controls from Qt Quick Controls 2
This patch changes the external drag and drop example to use qqc2
checkboxes instead of a custom made component.
It also changes the position of the checkbox in order to avoid having
the label text overlap with it.
Task-number: QTBUG-95736
Pick-to: 6.2
Change-Id: If3e798ea0ccd64921138690c7599876ec0584038
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'examples/quick/externaldraganddrop/DragAndDropTextItem.qml')
-rw-r--r-- | examples/quick/externaldraganddrop/DragAndDropTextItem.qml | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/examples/quick/externaldraganddrop/DragAndDropTextItem.qml b/examples/quick/externaldraganddrop/DragAndDropTextItem.qml index 605dc07434..ada96d2172 100644 --- a/examples/quick/externaldraganddrop/DragAndDropTextItem.qml +++ b/examples/quick/externaldraganddrop/DragAndDropTextItem.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2017 The Qt Company Ltd. +** Copyright (C) 2021 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the examples of the Qt Toolkit. @@ -48,8 +48,8 @@ ** ****************************************************************************/ -import QtQuick 2.2 -import "../shared" as Examples +import QtQuick +import QtQuick.Controls Rectangle { id: item @@ -62,8 +62,9 @@ Rectangle { to: "#EEE" duration: 1000 } - Text { + Label { anchors.fill: parent + anchors.margins: 10 text: item.display wrapMode: Text.WordWrap } @@ -104,9 +105,9 @@ Rectangle { item.display = "" } } - Examples.CheckBox { + CheckBox { id: acceptDropCB - anchors.right: parent.right + anchors.bottom: parent.bottom checked: true text: "accept drop" } |