Minimize / Maximize external Qt application
Hello, I am trying to minimize and maximize external application from my own using function ShowWindow()...
I tested code below with two Qt applications and it works, however, for some reason it does not work with one Qt application... I also asked on MSDN forum and they told me to ask here... Any idea why my code works with two qt applications but does not work with third?
@HWND hwnd = FindWindow(L"Qt5QWindowIcon", L"test1234");
if (hwnd != 0)
ui.label->setText("Window does not exist");
Can this be your solution:
Minimizes a window, even if the thread that owns the window is not responding._ This flag should only be used when minimizing windows from a different thread._
Does not work either...
But you are sure that you enter the if() clause and not the else
Have you wrote a test program for that?
I tested code written above with all parameters (SW_MINIMIZE, SW_MAXIMIZE, SW_FORCEMINIMIZE...)
One guy successfully minimized that app with FindWindow function... I don't understand why it does not work in my app...
- Do you have access to the source code of that "bad behaving" Qt application?
- What version of Qt does that application use?
- Can you trace the events that comes to the target app?
- Qt 5
- I don't understand the question...