Qt - activate window

Posted by Ockonal on Stack Overflow See other posts from Stack Overflow or by Ockonal
Published on 2009-06-27T15:12:10Z Indexed on 2010/04/12 10:03 UTC
Read the original article Hit count: 478

Filed under:
|
|

Hello, i have a QMainWindow. It has this parameters:

this->setWindowFlags(Qt::Tool);
this->setFocusPolicy(Qt::StrongFocus);
this->setAttribute(Qt::WA_QuitOnClose,true);

After showEvent calles my window is shown but unactivated. I tried to overload show function:

...    
QMainWindow::showEvent(event);
this->activateWindow();
...

But it doesn't help me.

EDIT: When i commented line

this->setWindowFlags(Qt::Tool);

everything worked fine, but i need in tool-flag. Any ideas?

EDIT:

  • OS: Linux
  • Programming language: c++
  • Qt version: 4.5.1

© Stack Overflow or respective owner

Related posts about c++

Related posts about qt