<?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[Workflow for Designing an Application with Qt Design Studio and Building a Python Backend]]></title><description><![CDATA[<p dir="auto">Hello,</p>
<p dir="auto">I’m just starting out with QML and modern Qt tools.</p>
<p dir="auto">I recently discovered Qt Design Studio and wanted to use it for a new Python project.</p>
<p dir="auto">I created a small example, but I’m stuck at the step of connecting QML to Python, specifically with .ui.qml files.</p>
<p dir="auto">My questions:</p>
<p dir="auto">-Why do I have a .ui.qml file in my project instead of a regular .qml file?</p>
<ul>
<li>How can I link a button in my .ui.qml to Python?</li>
</ul>
<p dir="auto">I haven’t found any accessible and clear tutorials on the real workflow for connecting Qt Design Studio -&gt; QML -&gt; Python.</p>
<p dir="auto">When I create the project in Qt Design Studio, I get a folder App1AppContent containing a file Screen01.ui.qml with my buttons.<br />
I have enabled the Python generator in Qt Design Studio, and there is a python folder.</p>
<pre><code>/*
This is a UI file (.ui.qml) that is intended to be edited in Qt Design Studio only.
It is supposed to be strictly declarative and only uses a subset of QML. If you edit
this file manually, you might introduce QML code that is not supported by Qt Design Studio.
Check out https://doc.qt.io/qtcreator/creator-quick-ui-forms.html for details on .ui.qml files.
*/
import QtQuick
import QtQuick.Controls
import SeculasApp

Rectangle {
    id: rectangle
    width: Constants.width
    height: Constants.height

    color: Constants.backgroundColor

    Button {
        id: btn_start_1
        x: 448
        y: 247
        text: qsTr("Start")

        Connections {
            target: btn_start_1
            function onClicked() {
                rectangle.state = "clicked"
            }
        }
    }
    Button {
        id: btn_start_2
        x: 448
        y: 300
        text: qsTr("Start 2")

        Connections {
            target: btn_start_2
            function onClicked() {
                rectangle.state = "clicked"
            }
        }
    }

    Switch {
        id: switch1
        x: 448
        y: 175
        text: qsTr("safety enable")
    }
    states: [
        State {
            name: "clicked"
        }
    ]
}
</code></pre>
<p dir="auto">Thanks</p>
]]></description><link>https://forum.qt.io/topic/163740/workflow-for-designing-an-application-with-qt-design-studio-and-building-a-python-backend</link><generator>RSS for Node</generator><lastBuildDate>Mon, 06 Apr 2026 20:20:54 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/163740.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 17 Nov 2025 15:37:31 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Workflow for Designing an Application with Qt Design Studio and Building a Python Backend on Fri, 21 Nov 2025 10:39:47 GMT]]></title><description><![CDATA[<p dir="auto">Thanks a lot <a class="plugin-mentions-user plugin-mentions-a" href="/user/pl45m4">@<bdi>Pl45m4</bdi></a> for your time !<br />
With this link (<a href="https://doc.qt.io/qtforpython-6/examples/index.html" target="_blank" rel="noopener noreferrer nofollow ugc">https://doc.qt.io/qtforpython-6/examples/index.html</a>) i found some good examples !<br />
However i face a big problem it seems impossible to embed QWidgets (like PyQtGraph or Matplotlib plots) directly in a QML panel.<br />
I'm looking for alternatives or solution but nothing ...<br />
Thanks</p>
]]></description><link>https://forum.qt.io/post/833844</link><guid isPermaLink="true">https://forum.qt.io/post/833844</guid><dc:creator><![CDATA[Gum73]]></dc:creator><pubDate>Fri, 21 Nov 2025 10:39:47 GMT</pubDate></item><item><title><![CDATA[Reply to Workflow for Designing an Application with Qt Design Studio and Building a Python Backend on Wed, 19 Nov 2025 12:36:37 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/gum73">@<bdi>Gum73</bdi></a> said in <a href="/post/833781">Workflow for Designing an Application with Qt Design Studio and Building a Python Backend</a>:</p>
<blockquote>
<p dir="auto">I managed to set up a small backend in Python, but there aren't many references on the subject...</p>
</blockquote>
<p dir="auto">For general Qt + Python things, you can check out the Qt for Python documentation</p>
<ul>
<li><a href="https://www.qt.io/development/qt-framework/python-bindings" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.qt.io/development/qt-framework/python-bindings</a></li>
<li><a href="https://doc.qt.io/qtforpython-6/" target="_blank" rel="noopener noreferrer nofollow ugc">https://doc.qt.io/qtforpython-6/</a></li>
</ul>
<p dir="auto">The connection to QML works there as it does with the original Qt for C++... create an engine, load/import QML modules etc.</p>
<blockquote>
<p dir="auto">How do people do it?</p>
</blockquote>
<p dir="auto">When I do QML stuff I usually don't use any visual editor for the most part. Putting simple QtQuick Elements together and playing around until it works it pretty straightforward.</p>
<blockquote>
<p dir="auto">I saw that QtQuick design was deprecated in QtCreator. Why? What should we use instead?</p>
</blockquote>
<p dir="auto">Definitely, yes (for a reason) !! I've activated the deprecated QtCreator plugin lately because I was curious... and it's horrible... :)<br />
For more complex projects/designs or if you really want an editor with WYSIWYG functionality, QtDS is the best and probably only (not sure ?!) choice.<br />
But since QtQuick is descriptive I don't see why I need it for basic design.<br />
For more complex projects and when you go hard on "Design" with utilizing the Figma Bridge (only premium/commercial feature anyway) it's a different story :)</p>
<p dir="auto">Edit:</p>
<p dir="auto">Here you can find simple Python examples for QML/QtQuick backends</p>
<ul>
<li><a href="https://doc.qt.io/qtforpython-6/examples/index.html" target="_blank" rel="noopener noreferrer nofollow ugc">https://doc.qt.io/qtforpython-6/examples/index.html</a></li>
</ul>
<p dir="auto">This, for instance:</p>
<ul>
<li><a href="https://doc.qt.io/qtforpython-6/examples/example_quick_window.html#example-quick-window" target="_blank" rel="noopener noreferrer nofollow ugc">https://doc.qt.io/qtforpython-6/examples/example_quick_window.html#example-quick-window</a></li>
</ul>
]]></description><link>https://forum.qt.io/post/833782</link><guid isPermaLink="true">https://forum.qt.io/post/833782</guid><dc:creator><![CDATA[Pl45m4]]></dc:creator><pubDate>Wed, 19 Nov 2025 12:36:37 GMT</pubDate></item><item><title><![CDATA[Reply to Workflow for Designing an Application with Qt Design Studio and Building a Python Backend on Wed, 19 Nov 2025 12:16:58 GMT]]></title><description><![CDATA[<p dir="auto">Thanks for everything!<br />
I've already seen those links, and unfortunately they don't cover Python very well.<br />
I managed to set up a small backend in Python, but there aren't many references on the subject...<br />
How do people do it? I saw that QtQuick design was deprecated in QtCreator. Why? What should we use instead?</p>
]]></description><link>https://forum.qt.io/post/833781</link><guid isPermaLink="true">https://forum.qt.io/post/833781</guid><dc:creator><![CDATA[Gum73]]></dc:creator><pubDate>Wed, 19 Nov 2025 12:16:58 GMT</pubDate></item><item><title><![CDATA[Reply to Workflow for Designing an Application with Qt Design Studio and Building a Python Backend on Mon, 17 Nov 2025 15:58:22 GMT]]></title><description><![CDATA[<p dir="auto">Hi and welcome to the forum</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/gum73">@<bdi>Gum73</bdi></a> said in <a href="/post/833710">Workflow for Designing an Application with Qt Design Studio and Building a Python Backend</a>:</p>
<blockquote>
<ul>
<li>Why do I have a .ui.qml file in my project instead of a regular .qml file?</li>
</ul>
</blockquote>
<p dir="auto">As you can tell from the content <code>*.ui.qml</code> files are similar to regular <code>*.qml</code> files, but the extension indicates that they come from Qt Design Studio's editor... in contrast to <code>*.ui</code> files which are edited by using QtDesigner or QtCreator's Design Mode describe user interfaces for QtWidget applications.<br />
And in fact that QML is a declarative language anyway, there is no difference apart from what is also already stated in the files header:</p>
<blockquote>
<p dir="auto"><strong><code>If you edit this file manually, you might introduce QML code that is not supported by Qt Design Studio.</code></strong></p>
</blockquote>
<p dir="auto">This means that <code>.ui.qml</code> files are or should always be compatible with QtDesignStudio.</p>
<blockquote>
<ul>
<li>How can I link a button in my .ui.qml to Python?</li>
</ul>
</blockquote>
<p dir="auto">There is</p>
<ul>
<li><a href="https://www.qt.io/blog/qtds-python" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.qt.io/blog/qtds-python</a></li>
</ul>
<p dir="auto">but I don't know how far it has become...</p>
<p dir="auto">You can always go the manual route and use QtDS as "designer"/editor, then include your design in your PySide/PyQt app.<br />
As I've said above, from that perspective <code>*.ui.qml</code> files are just <code>*.qml</code> files...<br />
(also for most OS only the part after the last dot forms the file extension, IIRC)</p>
<p dir="auto">Here you can see what is not allowed in QtDS UI QML files:</p>
<ul>
<li><a href="https://doc.qt.io/qtcreator/creator-quick-ui-forms.html" target="_blank" rel="noopener noreferrer nofollow ugc">https://doc.qt.io/qtcreator/creator-quick-ui-forms.html</a></li>
</ul>
]]></description><link>https://forum.qt.io/post/833711</link><guid isPermaLink="true">https://forum.qt.io/post/833711</guid><dc:creator><![CDATA[Pl45m4]]></dc:creator><pubDate>Mon, 17 Nov 2025 15:58:22 GMT</pubDate></item></channel></rss>