diff options
Diffstat (limited to 'examples/multimedia/video/qmlvideo/qmlvideo/SceneDrag.qml')
-rw-r--r-- | examples/multimedia/video/qmlvideo/qmlvideo/SceneDrag.qml | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/examples/multimedia/video/qmlvideo/qmlvideo/SceneDrag.qml b/examples/multimedia/video/qmlvideo/qmlvideo/SceneDrag.qml new file mode 100644 index 000000000..99a7cb7f1 --- /dev/null +++ b/examples/multimedia/video/qmlvideo/qmlvideo/SceneDrag.qml @@ -0,0 +1,34 @@ +// Copyright (C) 2016 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick + +Scene { + id: root + property int margin: 20 + property string contentType + + Image { + id: background + source: "images/leaves.jpg" + x: (parent.width - width) / 2 + y: (parent.height - height) / 2 + + Content { + id: content + anchors.centerIn: parent + width: root.contentWidth + contentType: root.contentType + source: root.source1 + volume: root.volume + onVideoFramePainted: root.videoFramePainted() + } + } + + MouseArea { + anchors.fill: parent + drag.target: background + } + + Component.onCompleted: root.content = content +} |