Advertisement
Pastybinneriest

Untitled

Dec 16th, 2021 (edited)
2,174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
QML 1.21 KB | None | 0 0
  1. import QtQuick 2.15
  2. import QtQuick.Controls 2.15
  3.  
  4. ApplicationWindow {
  5.     visible: true
  6.     width: 1920
  7.     height: 1080
  8.     title: "HelloApp"
  9.     flags: Qt.FramelessWindowHint | Qt.Window | Qt.WindowStaysOnTopHint
  10.     onClosing: close.accepted = false
  11.     property string currTime: "0"
  12.     property QtObject backend
  13.     Rectangle {
  14.         anchors.fill: parent
  15.         Image {
  16.             sourceSize.width: parent.width
  17.             sourceSize.height: parent.height
  18.             source: 'https://i.imgur.com/5iCBMve.jpg'
  19.             fillMode: Image.PreserveAspectCrop
  20.         }
  21.         Rectangle {
  22.             anchors.fill: parent
  23.             color: "transparent"
  24.             Text {
  25.                 text: ""
  26.                 font.pixelSize: 24
  27.                 color: "white"
  28.             }
  29.         Text {
  30.             anchors {
  31.                 top: top.bottom
  32.                 topMargin: 12
  33.                 left: parent.left
  34.                 leftMargin: 12
  35.             }
  36.             text: currTime
  37.             font.pixelSize: 48
  38.             color: "white"
  39.         }
  40.       }
  41.     Connections {
  42.         target: backend
  43.         function onUpdated(msg) {
  44.             currTime = msg;
  45.         }
  46.     }
  47. }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement