tags:

views:

208

answers:

1

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.

A: 

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).

Andrew Medico
Well, I used `Qt::Tool` flag for my widget because when I close main window I want whole application to quit. I've just found out that `Qt::SubWindow` flag gives me the functionality I wanted in my question but... when I minimize main window my I want all windows/widgets of application to become minimized - which works with `Qt::Tool` but doesn't with `Qt::SubWindow`. Do you know if it is doable?
Moomin