<?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[Can Qt be launched as a thread in c application ?]]></title><description><![CDATA[<p dir="auto">I want qt to be as frontend of my application , for which i am launching it (qt) as a seperate thread of my multi threaded application . The other threads of my code is written in c. Is this approach feasible , for qt to work or am i missing something here ?<br />
Thanks</p>
]]></description><link>https://forum.qt.io/topic/70292/can-qt-be-launched-as-a-thread-in-c-application</link><generator>RSS for Node</generator><lastBuildDate>Mon, 12 Oct 2026 05:37:55 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/70292.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 17 Aug 2016 03:49:20 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Can Qt be launched as a thread in c application ? on Thu, 18 Aug 2016 12:40:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/visiot">@<bdi>visiot</bdi></a></p>
<p dir="auto">See also this thread:<br />
<a href="https://forum.qt.io/topic/67285/ui-application-as-thread-cpu-load-almost-100/11">https://forum.qt.io/topic/67285/ui-application-as-thread-cpu-load-almost-100/11</a></p>
]]></description><link>https://forum.qt.io/post/342977</link><guid isPermaLink="true">https://forum.qt.io/post/342977</guid><dc:creator><![CDATA[kshegunov]]></dc:creator><pubDate>Thu, 18 Aug 2016 12:40:45 GMT</pubDate></item><item><title><![CDATA[Reply to Can Qt be launched as a thread in c application ? on Thu, 18 Aug 2016 06:25:21 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mvuori">@<bdi>mvuori</bdi></a> said:</p>
<blockquote>
<p dir="auto">The UI functions in Qt generally work only in the main thread.</p>
</blockquote>
<p dir="auto">Actually, the UI functions in Qt generally work only in the GUI thread (which is the thread that created QGuiApplication/QApplication)</p>
<p dir="auto">The GUI thread does not have to be the main thread. See <a href="http://stackoverflow.com/questions/22289423/how-to-avoid-qt-app-exec-blocking-main-thread" target="_blank" rel="noopener noreferrer nofollow ugc">http://stackoverflow.com/questions/22289423/how-to-avoid-qt-app-exec-blocking-main-thread</a></p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/visiot">@<bdi>visiot</bdi></a> said:</p>
<blockquote>
<p dir="auto">I want qt to be as frontend of my application , for which i am launching it (qt) as a seperate thread of my multi threaded application . The other threads of my code is written in c. Is this approach feasible , for qt to work or am i missing something here ?<br />
Thanks</p>
</blockquote>
<p dir="auto">It is feasible (see my answer in the link above), but you will need to create a wrapper to call C++ functions from C. See <a href="http://stackoverflow.com/questions/2744181/how-to-call-c-function-from-c" target="_blank" rel="noopener noreferrer nofollow ugc">http://stackoverflow.com/questions/2744181/how-to-call-c-function-from-c</a></p>
]]></description><link>https://forum.qt.io/post/342915</link><guid isPermaLink="true">https://forum.qt.io/post/342915</guid><dc:creator><![CDATA[JKSH]]></dc:creator><pubDate>Thu, 18 Aug 2016 06:25:21 GMT</pubDate></item><item><title><![CDATA[Reply to Can Qt be launched as a thread in c application ? on Wed, 17 Aug 2016 06:33:31 GMT]]></title><description><![CDATA[<p dir="auto">If the Qt parts are the front end, the UI part, you don't "launch it as a separate thread", but have it as the main thread of the application, and launch the other functionality as separate threads as needed. The UI functions in Qt generally work only in the main thread.</p>
]]></description><link>https://forum.qt.io/post/342731</link><guid isPermaLink="true">https://forum.qt.io/post/342731</guid><dc:creator><![CDATA[mvuori]]></dc:creator><pubDate>Wed, 17 Aug 2016 06:33:31 GMT</pubDate></item></channel></rss>