Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import QtQuick 2.7
- import QtQuick.Window 2.3
- import QtQuick.Controls 2.2 as C
- import QtQuick.Templates 2.2 as T
- import QtQuick.Layouts 1.3
- Window {
- visible: true
- width: 640
- height: 480
- title: qsTr("Hello World")
- T.Control {
- id: container
- anchors.fill: parent
- font: Qt.font({"family": "Arial", "pixelSize": 30})
- }
- Timer {
- interval: 1000
- onTriggered: {
- temp.createObject(container)
- }
- Component.onCompleted: start()
- }
- Component {
- id: temp
- Item {
- anchors.centerIn: parent
- T.Label {
- text: "Centered"
- anchors.centerIn: parent
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement