PDA

View Full Version : QProcess starting minimized



kobus
11th August 2009, 14:57
Hi

I jumped into Qt by starting to rewrite some native Windows application. It has some functionality that launches other applications. I had implemented a class similar to QProcess so it seemed that QProcess would do the job. I want to launch some of the applications in a minimized state. And it seems this is a problem with Qt. I found this thread and hoped that since it was in 2007 something might have changed meanwhile...
http://www.qtcentre.org/forum/f-qt-programming-2/t-qprocess-starting-minimized-5901.html

In the native app I used a ShellExecute function which has a parameter in which you can specify SW_SHOWMINIMIZED if the application should be minimized on launch.

Is this still not possible with Qt?

Some other functionality that I implemented like finding the window associated with the process by enumerating windows associated with the process and picking a window based on certain properties will probably also be an issue in Qt... Damn!

Any good news will be appreciated.

PS: I don't have the code for the applications that are being launched. It is defined in a config file as well so there is no specific code to launch an application.

wysota
12th August 2009, 00:01
Your code is by no means portable so trying to switch to QProcess without any other benefits is probably not worth the effort if the thing you have now works fine.