Qt-interest Archive, February 2007
QProcess to launch Windows GUI apps? (Qt 4.2)
Message 1 in thread
Is this supposed to work?
I am trying to use QProcess to launch a simple windows GUI app, and wait
for it to finish. Looks like this:
QString path = path_to_app;
QString workingDir = QFileInfo(path).dirPath()
QProcess process;
process.setWorkingDirectory(workingDir);
process.start(path);
process.waitForFinished();
Yet it returns immediately without starting the app. Down in the start()
function, CreateProcessW() is returning FALSE.
Is this because the creation flags are being set with CREATE_NO_WINDOW?
--
[ signature omitted ]
Message 2 in thread
Hi
Try myProcess.setCommunication( 0 )
On 23/02/07, Paul Miller <paul@xxxxxxxxxx> wrote:
>
> Is this supposed to work?
>
> I am trying to use QProcess to launch a simple windows GUI app, and wait
> for it to finish. Looks like this:
>
> QString path = path_to_app;
> QString workingDir = QFileInfo(path).dirPath()
>
> QProcess process;
> process.setWorkingDirectory(workingDir);
> process.start(path);
> process.waitForFinished();
>
> Yet it returns immediately without starting the app. Down in the start()
> function, CreateProcessW() is returning FALSE.
>
> Is this because the creation flags are being set with CREATE_NO_WINDOW?
>
>
> --
> Paul Miller | paul@xxxxxxxxxx | www.fxtech.com | Got Tivo?
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
>
--
[ signature omitted ]
Message 3 in thread
John Dean wrote:
> Hi
>
> Try myProcess.setCommunication( 0 )
Where does setCommunication() come from? It's not in the Qt 4 QProcess API.
>
>
> On 23/02/07, *Paul Miller* <paul@xxxxxxxxxx <mailto:paul@xxxxxxxxxx>>
> wrote:
>
> Is this supposed to work?
>
> I am trying to use QProcess to launch a simple windows GUI app, and wait
> for it to finish. Looks like this:
>
> QString path = path_to_app;
> QString workingDir = QFileInfo(path).dirPath()
>
> QProcess process;
> process.setWorkingDirectory(workingDir);
> process.start(path);
> process.waitForFinished();
>
> Yet it returns immediately without starting the app. Down in the start()
> function, CreateProcessW() is returning FALSE.
>
> Is this because the creation flags are being set with CREATE_NO_WINDOW?
>
>
> --
> Paul Miller | paul@xxxxxxxxxx <mailto:paul@xxxxxxxxxx> |
> www.fxtech.com <http://www.fxtech.com> | Got Tivo?
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx
> <mailto:qt-interest-request@xxxxxxxxxxxxx> with "unsubscribe" in the
> subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
>
>
>
> --
> Best Regards
> John Dean
--
[ signature omitted ]
Message 4 in thread
Paul Miller wrote:
> John Dean wrote:
>> Hi
>>
>> Try myProcess.setCommunication( 0 )
>
> Where does setCommunication() come from? It's not in the Qt 4 QProcess API.
Ah - that was a Qt3 function. In my subject I mentioned I was using Qt4.
There doesn't seem to be a direct replacement for this in Qt4, but
digging through the code and looking at docs for CreateProcess() makes
it look like that isn't it.
I've had problems with CreateProcess not working with 16 bit binaries.
I'll have to check to see if the program I am trying to launch is 16 bit
or 32.
>
>>
>>
>> On 23/02/07, *Paul Miller* <paul@xxxxxxxxxx <mailto:paul@xxxxxxxxxx>>
>> wrote:
>>
>> Is this supposed to work?
>>
>> I am trying to use QProcess to launch a simple windows GUI app,
>> and wait
>> for it to finish. Looks like this:
>>
>> QString path = path_to_app;
>> QString workingDir = QFileInfo(path).dirPath()
>>
>> QProcess process;
>> process.setWorkingDirectory(workingDir);
>> process.start(path);
>> process.waitForFinished();
>>
>> Yet it returns immediately without starting the app. Down in the
>> start()
>> function, CreateProcessW() is returning FALSE.
>>
>> Is this because the creation flags are being set with
>> CREATE_NO_WINDOW?
>>
>>
>> --
>> Paul Miller | paul@xxxxxxxxxx <mailto:paul@xxxxxxxxxx> |
>> www.fxtech.com <http://www.fxtech.com> | Got Tivo?
>>
>> --
>> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx
>> <mailto:qt-interest-request@xxxxxxxxxxxxx> with "unsubscribe" in the
>> subject or the body.
>> List archive and information: http://lists.trolltech.com/qt-interest/
>>
>>
>>
>>
>> --
>> Best Regards
>> John Dean
>
>
--
[ signature omitted ]