How to make Qt::Tool not stay on top of the main window

3k views Asked by At

I have problem with Qt::Tool flag. When I create new widget with Qt::Tool flag it appears on top of the main window. But when I switch back to main window and make it active the I still have the tool widget in front so it my main window is not fully visible.

Qt::WindowStaysOnTopHint is not active. Just in case - environment is KDE4

Thanks in advance.

1

There are 1 answers

1
nobody On BEST ANSWER

That's kind of the point of a tool window - to stay on top automatically. If you want an otherwise normal window but without a titlebar, do that instead of making a tool window (i.e. unset Qt::WindowTitleHint in the window's flags - either by using the (QWidget* parent, Qt::WindowFlags f) constructor or the setWindowFlags method).