Need to bring Qt application to foreground called from win32 application
Hello i have simple win32 application that uses the createProcess method to call Qt application the problem is i like to bring the Qt application to the foreground . who is responsible for this ? the parent win32 app or the Qt application ?
Re: Need to bring Qt application to foreground called from win32 application
Look at the CreateProcess (CreateProcess Function) this param: LPSTARTUPINFO lpStartupInfo. [IMG]STARTUPINFO[/IMG].
There's a field to set how the window will show, WORD wShowWindow;
You can use the same values that you can use in the ShowWindow Function.
I think if you use this SW_SHOWNORMAL it will work.
Re: Need to bring Qt application to foreground called from win32 application
Try this it might be helps you.
this->stackUnder(parentWidget()); [this means your QMainwindow]
Re: Need to bring Qt application to foreground called from win32 application
Not a answer but some hints:
One application of mine is minimzed to the tray. To bring it to the front again I use this code:
Code:
showMinimized(); // This is to bring up the window if not minimized
// but beneath some other window
setWindowState(Qt::WindowActive);
showNormal();
I've got this code from sowhere but can't remember where. So tribut to the unknown guy who posted it in the wast land of the iternet...