PDA

View Full Version : Making an executible started from my app run non-minimized



vycke
16th February 2010, 16:59
I have a QT application which allows the user to start other executables (using QProcess::startDetached() to run them). Sometimes, the new app is run behind my app (users say it is minimized, but that's because it's behind the maximized app). Is there a way to push the new executable to the front? I'll accept a parameter for QProcess or another call. This runs under Linux & Windows, but the problem only seems to occur under Windows.

Thanks,

Vycke

nish
17th February 2010, 09:28
Windows dosent allow you to bring any other application in front if the user is working on some other application. I assume that the new app is started by pressing a button on your main app. So your main app has the keyboard focus, thats why the new app is always behind it. Try to minimize your main window before launching the new app.

Lykurg
17th February 2010, 10:29
... if you don't want that your app is minimized, you can give QWidget::clearFocus() a try.