Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import QtQuick 2.2
- import QtQuick.Controls 1.1
- import "UpdateObject.js" as OutFunc
- ApplicationWindow {
- id: main_window
- visible: true
- width: 640
- height: 480
- title: qsTr("Hello World")
- Rectangle {
- id: main_rect
- objectName: "main_rect"
- anchors.fill: parent
- Rectangle {
- id: r1
- anchors.centerIn: parent
- Text {
- id: main_text
- objectName: "main_text"
- text: qsTr("Hello World")
- }
- }
- Rectangle {
- id: r2
- anchors.top: r1.bottom
- anchors.topMargin: 5
- ListView {
- id: main_list
- objectName: "main_list"
- delegate: Text {
- text: "blabla"
- }
- //model:3
- }
- }
- Timer {
- id: position_tracker
- interval: 300
- running: true
- repeat: true
- onTriggered: {
- if (OutFunc.getComponentByName(main_rect,"main_text") != null) {
- } else {
- console.log("1 main_text = null!");
- }
- if (OutFunc.getComponentByName(main_rect,"main_text") != null) {
- } else {
- console.log("2 main_text = null!");
- }
- if (OutFunc.getComponentByName(main_rect,"main_list") != null) {
- } else {
- console.log("1 main_list = null!");
- }
- if (OutFunc.getComponentByName(main_rect,"main_list") != null) {
- } else {
- console.log("2 main_list = null!");
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement