<?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[Using QUiLoader to load a composite widget]]></title><description><![CDATA[<p dir="auto">Hello,<br />
I normally create a desktop application by laying out a user interface in Qt Designer, then create a Python object (the MainWindow), and load the ui file.  Something like this:</p>
<pre><code>self.ui = QtUiTools.QUiLoader().load(uiPath)
</code></pre>
<p dir="auto">The new thing is that I have to load another UI file (a QWidget) and insert it into a QFrame of my "normal" UI.  This seems to work OK, but I cannot connect signals from the "new" widgets.  I think it is an east fix, but I have been looking at it for hours so I have to ask for some help.</p>
<p dir="auto">I can't attach files to this post but I included them in the following DropBox folder:<br />
<a href="https://www.dropbox.com/scl/fo/ozfn00nanluloluqprypf/AMZyU6hTpLqhPQozjh1dBM0?rlkey=7i4a23eqcrkyffet9z42td5jo&amp;st=np630341&amp;dl=0" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.dropbox.com/scl/fo/ozfn00nanluloluqprypf/AMZyU6hTpLqhPQozjh1dBM0?rlkey=7i4a23eqcrkyffet9z42td5jo&amp;st=np630341&amp;dl=0</a></p>
<p dir="auto">There is a <code>start.py</code> file that loads the <code>MainApplication.ui</code> file.  Now I have the typical application.  After pressing the only button, the application loads <code>ProjectUserInterface.ui</code> which seems to work great.  It is visible and the button seems "responsive". But when the application loads <code>projectModule.py</code> which is responsible for the signals and slots from the  <code>ProjectUserInterface.ui</code>, I cannot find the button to connect its signal.</p>
<p dir="auto">I would really appreciate a suggestion to get around this problem.  Thank you.</p>
]]></description><link>https://forum.qt.io/topic/164907/using-quiloader-to-load-a-composite-widget</link><generator>RSS for Node</generator><lastBuildDate>Mon, 31 Aug 2026 15:25:01 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/164907.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 20 Jul 2026 20:41:41 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Using QUiLoader to load a composite widget on Tue, 21 Jul 2026 08:02:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/henryinutah">@<bdi>HenryInUtah</bdi></a><br />
At least from C++ unless it is any different from Python/PySide: when you load a <code>.ui</code> file at runtime you get all its widgets but you do not get "variables" for each one, like you do when you generate code from it via <code>uic</code>.  That means you have to "find" widgets to address them, via <code>QWidget.findChild</code>/<code>findChildren()</code> from a top-level widget.  You would have to do that to read/write their values or attach signals, etc.  Is that not the situation you are in?</p>
<p dir="auto">Which is pretty inconvenient, and one of the many reasons why most of us do not pick dynamic runtime loading of the <code>.ui</code> file but instead use <code>uic</code> to generate "variables" for each widget we can use directly, as <a class="plugin-mentions-user plugin-mentions-a" href="/user/friedemannkleint">@<bdi>friedemannkleint</bdi></a> has recommended.</p>
]]></description><link>https://forum.qt.io/post/839269</link><guid isPermaLink="true">https://forum.qt.io/post/839269</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Tue, 21 Jul 2026 08:02:45 GMT</pubDate></item><item><title><![CDATA[Reply to Using QUiLoader to load a composite widget on Tue, 21 Jul 2026 07:04:26 GMT]]></title><description><![CDATA[<p dir="auto">It seems the files cannot be downloaded with some sort of login, can you maybe paste a relevant excerpt? - Note we generally recommend using uic over QUiLoader, see <a href="https://doc.qt.io/qtforpython-6/tutorials/basictutorial/uifiles.html#tutorial-uifiles" target="_blank" rel="noopener noreferrer nofollow ugc">https://doc.qt.io/qtforpython-6/tutorials/basictutorial/uifiles.html#tutorial-uifiles</a> .</p>
]]></description><link>https://forum.qt.io/post/839262</link><guid isPermaLink="true">https://forum.qt.io/post/839262</guid><dc:creator><![CDATA[friedemannkleint]]></dc:creator><pubDate>Tue, 21 Jul 2026 07:04:26 GMT</pubDate></item></channel></rss>