[Development] RFC: QProcess variant or separate class for launching applications "GUI-style"
Sorvig Morten
Morten.Sorvig at theqtcompany.com
Thu Jan 7 15:06:39 CET 2016
> On 07 Jan 2016, at 10:04, René J. V. Bertin <rjvbertin at gmail.com> wrote:
>
>>
>> Right. You should open the bundle, not the executable inside it. That's not a
>> problem of QProcess, you just ran the wrong thing.
>
> It's a little bit more subtle than that, and if you look at qprocess_unix.cpp
> you'll see a bit of code that does the opposite when it encounters an app
> bundle.
>
> But what you're basically saying is that if QProcess cannot do the job for us,
> we just have to use something other than Qt?
One alternative could be to branch out from cross-paltform code and just
call the native API, which will do exactly what you want. Recent versions
of Qt makes this easier on OS X, we’ve for example added QString:toNSString()
and QUrl::toNSURL() for data conversion.
Another point: Isn't there a fundamental incompatibiity between LaunchServices
and QProcess? LanchServices may ‘activate’ an already running process, while
QProcess always starts a new process.
Morten
More information about the Development
mailing list