Advertisement
Guest User

Untitled

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