Warning, /webapps/qmlonline/qml/main.qml is written in an unsupported language. File is not indexed.
0001 import QtQuick 2.12 0002 import QtQuick.Controls 2.13 0003 import QtQuick.Layouts 1.13 0004 0005 // Necessary imports to have these working for userITem 0006 import QtQuick.XmlListModel 2.13 0007 0008 import QtQml.Models 2.12 0009 0010 import Qt.labs.calendar 1.0 0011 0012 import Util 1.0 0013 0014 ApplicationWindow { 0015 id: window 0016 title: "qmlonline" 0017 visible: true 0018 0019 Connections { 0020 target: Util 0021 onCodeChanged: userParentItem.create(Util.code) 0022 } 0023 0024 Item { 0025 id: userParentItem 0026 anchors.fill: parent 0027 property var userItem: null 0028 0029 function create(textComponent) { 0030 if(userItem) { 0031 userItem.destroy() 0032 } 0033 userItem = Qt.createQmlObject(textComponent, userParentItem, "userItem") 0034 } 0035 0036 Component.onCompleted: userParentItem.create(Util.code) 0037 } 0038 }