<?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[QProcess not work with start but work with startDetached]]></title><description><![CDATA[<p dir="auto">I have a problem with start dos application with Qprocess::start.</p>
<p dir="auto">@<br />
#include &lt;QtGui/QApplication&gt;<br />
#include &lt;QProcess&gt;</p>
<p dir="auto">int main(int argc, char *argv[])<br />
{<br />
QApplication a(argc, argv);</p>
<pre><code>QProcess *process = new QProcess();
process-&gt;start("c:\\femag\\wfemag_02-2013.exe");

return a.exec&amp;#40;&amp;#41;;
</code></pre>
<p dir="auto">}</p>
<p dir="auto">@<br />
the executed application fails at some point with this kind of error "invalid handle".</p>
<p dir="auto">when I use<br />
@<br />
process-&gt;startDetached("c:\femag\wfemag_02-2013.exe");<br />
@</p>
<p dir="auto">the application starts OK. But I need to use<br />
@<br />
process-&gt;start().</p>
<p dir="auto">@</p>
<p dir="auto">I tried this on windows7 32 or 64 bit with same issue. But in windows8 it is working ok.</p>
<p dir="auto">Can somebody help me with this problem?</p>
]]></description><link>https://forum.qt.io/topic/25976/qprocess-not-work-with-start-but-work-with-startdetached</link><generator>RSS for Node</generator><lastBuildDate>Fri, 07 Aug 2026 07:01:36 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/25976.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 08 Apr 2013 07:06:53 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to QProcess not work with start but work with startDetached on Mon, 08 Apr 2013 10:55:34 GMT]]></title><description><![CDATA[<p dir="auto">maybe it has a built in protection against anti-debugging...</p>
]]></description><link>https://forum.qt.io/post/172931</link><guid isPermaLink="true">https://forum.qt.io/post/172931</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Mon, 08 Apr 2013 10:55:34 GMT</pubDate></item><item><title><![CDATA[Reply to QProcess not work with start but work with startDetached on Mon, 08 Apr 2013 10:37:53 GMT]]></title><description><![CDATA[<p dir="auto">That is clear. But the question is different - what causes the attached process to fail?</p>
]]></description><link>https://forum.qt.io/post/172927</link><guid isPermaLink="true">https://forum.qt.io/post/172927</guid><dc:creator><![CDATA[sierdzio]]></dc:creator><pubDate>Mon, 08 Apr 2013 10:37:53 GMT</pubDate></item><item><title><![CDATA[Reply to QProcess not work with start but work with startDetached on Mon, 08 Apr 2013 10:03:58 GMT]]></title><description><![CDATA[<p dir="auto">The difference between start() and startDetached() is that when calling start() you open the process as part of your current process (so to speak) so if you close your applications process the child process will be closed. With startDetached however you start a standalone process that is independent from your applications process</p>
]]></description><link>https://forum.qt.io/post/172925</link><guid isPermaLink="true">https://forum.qt.io/post/172925</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Mon, 08 Apr 2013 10:03:58 GMT</pubDate></item><item><title><![CDATA[Reply to QProcess not work with start but work with startDetached on Mon, 08 Apr 2013 08:44:22 GMT]]></title><description><![CDATA[<p dir="auto">I don't know the internal details, sorry.</p>
]]></description><link>https://forum.qt.io/post/172920</link><guid isPermaLink="true">https://forum.qt.io/post/172920</guid><dc:creator><![CDATA[sierdzio]]></dc:creator><pubDate>Mon, 08 Apr 2013 08:44:22 GMT</pubDate></item><item><title><![CDATA[Reply to QProcess not work with start but work with startDetached on Mon, 08 Apr 2013 08:30:25 GMT]]></title><description><![CDATA[<p dir="auto">the app is 3rd party for electromagnetic calculations (<a href="https://www.dropbox.com/s/bx8w5f1b42eutz6/wfemag_02-2013.exe" target="_blank" rel="noopener noreferrer nofollow ugc">https://www.dropbox.com/s/bx8w5f1b42eutz6/wfemag_02-2013.exe</a>)</p>
<p dir="auto">it should be start alone without any file in working directory.</p>
<p dir="auto">what the process-&gt;startDetached() make differently as process-&gt;start()<br />
?</p>
<p dir="auto">I need check end of calculation. Therefore I wait for process finished.</p>
]]></description><link>https://forum.qt.io/post/172918</link><guid isPermaLink="true">https://forum.qt.io/post/172918</guid><dc:creator><![CDATA[renocz]]></dc:creator><pubDate>Mon, 08 Apr 2013 08:30:25 GMT</pubDate></item><item><title><![CDATA[Reply to QProcess not work with start but work with startDetached on Mon, 08 Apr 2013 08:13:31 GMT]]></title><description><![CDATA[<p dir="auto">You should be using unix-style paths in Qt, not this Windows heresy. But this is not the cause of your problem, of course.</p>
<p dir="auto">There are some restrictions in QProcess (especially on Windows), it might be a bit tricky. First, I would recommend to specify the working directory yourself. Maybe the app you are trying to run expects a certain file to be present in the working dir? Does the app you are trying to run do some magical threading stuff? Or maybe it requires some changes to <em>env</em>?</p>
]]></description><link>https://forum.qt.io/post/172914</link><guid isPermaLink="true">https://forum.qt.io/post/172914</guid><dc:creator><![CDATA[sierdzio]]></dc:creator><pubDate>Mon, 08 Apr 2013 08:13:31 GMT</pubDate></item></channel></rss>