hakermania
6th September 2011, 11:36
Hello, when one instance of my program detects another instance it sends a message to the already running instance and it tries to strongly focus itself.
The code that does the focus is:
this->showNormal();
this->setFocusPolicy(Qt::StrongFocus);
this->setFocus();
this->raise();
this->setVisible(true);
this->activateWindow();
And all these in a row result to only a blinking minimize-bar, just like the program wants user's attention, but I need stronger focus, like go top of all the other windows.
How is this possible? Thanks!
The code that does the focus is:
this->showNormal();
this->setFocusPolicy(Qt::StrongFocus);
this->setFocus();
this->raise();
this->setVisible(true);
this->activateWindow();
And all these in a row result to only a blinking minimize-bar, just like the program wants user's attention, but I need stronger focus, like go top of all the other windows.
How is this possible? Thanks!