aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/externaldraganddrop/externaldraganddrop.qml
blob: b0cd20e69edc918d2d99c23d18a0c1a66c19f418 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause

import QtQuick
import QtQuick.Controls
import QtQuick.Layouts

Item {
    id: root
    width: 320
    height: 480

    ColumnLayout {

        anchors.fill: parent
        anchors.margins: 8

        Label {
            Layout.fillWidth: true
            text: "Drag text into, out of, and between the boxes below."
            wrapMode: Text.WordWrap
        }

        DragAndDropTextItem {
            Layout.fillWidth: true
            Layout.fillHeight: true
            display: "Sample Text"
        }

        DragAndDropTextItem {
            Layout.fillWidth: true
            Layout.fillHeight: true
            display: "Option/ctrl drag to copy instead of move text."
        }

        DragAndDropTextItem {
            Layout.fillWidth: true
            Layout.fillHeight: true
            dropEnabled: false
            display: "Drag out into other applications."
        }
    }
}