<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Document refresh or script earlier than onCompleted]]></title><description><![CDATA[<p dir="auto">My project is an extension to a black box application (Traktor). By black box, I mean a lot of the classes being used are coming from a compiled c++ library (no source available). The files in this project are very long and repetitive. Adding loops for object creation will exponentially cut down on the file complexity.</p>
<p dir="auto">Using Repeaters would work, but the objects I am creating are not derived from <em>Item</em>. Is there a way around that?</p>
<p dir="auto">Within Component.onCompleted I am able to create objects and get then assigned to the right parents with commands like below</p>
<pre><code>Qt.createQmlObject('import CSI 1.0; import QtQuick 2.12; ButtonScriptAdapter {name: "'+ "PadFX3" +'"; brightness:1; color:colorToLED(preferences.iFX3Color), module, PadFX3}',

for(var i=1; i&lt;9; i++){
     var obj = Qt.createQmlObject('import CSI 1.0; import QtQuick 2.12; Wire{ from:"'+ surface +'.pads.'+ i +'"; to: "PadFX'+ i +'" }', wiresS1, "PadFX" + i); 
}
</code></pre>
<p dir="auto">The problem is, it seems Component.onCompleted is too late. After I add my <em>Wire</em> components, is it possible to make the document execute those lines? I feel they are being added to the module correctly, but not getting executed.</p>
]]></description><link>https://forum.qt.io/topic/132457/document-refresh-or-script-earlier-than-oncompleted</link><generator>RSS for Node</generator><lastBuildDate>Fri, 06 Nov 2026 02:49:06 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/132457.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 02 Dec 2021 00:09:29 GMT</pubDate><ttl>60</ttl></channel></rss>