1import QtQuick 2.4 2import QtQuick.Controls 1.1 3import QtQuick.Controls.Styles 1.3 4import QtQuick.Dialogs 1.2 5import QtQuick.Window 2.1 6 7import org.freedesktop.gstreamer.GLVideoItem 1.0 8 9ApplicationWindow { 10 id: window 11 visible: true 12 width: 640 13 height: 480 14 x: 30 15 y: 30 16 color: "black" 17 18 Item { 19 anchors.fill: parent 20 21 GstGLVideoItem { 22 id: video 23 objectName: "videoItem" 24 anchors.centerIn: parent 25 width: parent.width 26 height: parent.height 27 } 28 29 Rectangle { 30 color: Qt.rgba(1, 1, 1, 0.7) 31 border.width: 1 32 border.color: "white" 33 anchors.bottom: video.bottom 34 anchors.bottomMargin: 15 35 anchors.horizontalCenter: parent.horizontalCenter 36 width : parent.width - 30 37 height: parent.height - 30 38 radius: 8 39 40 MouseArea { 41 id: mousearea 42 anchors.fill: parent 43 hoverEnabled: true 44 onEntered: { 45 parent.opacity = 1.0 46 hidetimer.start() 47 } 48 } 49 50 Timer { 51 id: hidetimer 52 interval: 5000 53 onTriggered: { 54 parent.opacity = 0.0 55 stop() 56 } 57 } 58 } 59 } 60} 61