Debian Codegraph @

tests/examples/qt6/qmloverlay/main.qml

raw
1 // SPDX-License-Identifier: BSD-2-Clause
2 //
3 // Copyright (C) 2023, Matthew Waters <[email protected]>
4 //
5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are met:
7 //
8 // a) Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer.
10 //
11 // b) Redistributions in binary form must reproduce the above copyright
12 // notice, this list of conditions and the following disclaimer in
13 // the documentation and/or other materials provided with the distribution.
14 //
15 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
17 // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
19 // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20 // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21 // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22 // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23 // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
25 // THE POSSIBILITY OF SUCH DAMAGE.
26
27 import QtQuick 6.0
28 import QtQuick.Controls 6.0
29 import QtQuick.Dialogs 6.0
30 import QtQuick.Window 6.0
31
32 import org.freedesktop.gstreamer.Qt6GLVideoItem 1.0
33
34 ApplicationWindow {
35 id: window
36 visible: true
37 width: 640
38 height: 480
39 x: 30
40 y: 30
41 color: "black"
42
43 Item {
44 anchors.fill: parent
45
46 GstGLQt6VideoItem {
47 id: video
48 objectName: "videoItem"
49 anchors.centerIn: parent
50 width: parent.width
51 height: parent.height
52 }
53
54 Text {
55 anchors.bottom: parent.bottom
56 anchors.horizontalCenter: parent.horizontalCenter
57 text: "qmlglsink text"
58 font.pointSize: 20
59 color: "yellow"
60 style: Text.Outline
61 styleColor: "blue"
62 }
63 }
64 }