Advertisement
Guest User

Untitled

a guest
Oct 11th, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
QML 0.67 KB | None | 0 0
  1. import QtQuick 2.7
  2. import QtQuick.Window 2.3
  3. import QtQuick.Templates 2.2 as T
  4.  
  5. Window {
  6.     visible: true
  7.     width: 640
  8.     height: 480
  9.     title: qsTr("Hello World")
  10.  
  11.     T.Control {
  12.         id: container
  13.         anchors.fill: parent
  14.         font: Qt.font({"family": "Arial", "pixelSize": 30})
  15.     }
  16.  
  17.     Timer {
  18.         interval: 1000
  19.         onTriggered: temp.createObject(container)
  20.         Component.onCompleted: start()
  21.     }
  22.  
  23.     Component {
  24.         id: temp
  25.         Item {
  26.             anchors.centerIn: parent
  27.             T.Label {
  28.                 text: "Centered"
  29.                 anchors.centerIn: parent
  30.             }
  31.         }
  32.     }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement