简体   繁体   English

如何使Qt :: Tool不停留在主窗口顶部

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

I have problem with Qt::Tool flag. 我对Qt::Tool标志有Qt::Tool When I create new widget with Qt::Tool flag it appears on top of the main window. 当我使用Qt::Tool标志创建新的小部件时,它会出现在主窗口的顶部。 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. Qt::WindowStaysOnTopHint无效。 Just in case - environment is KDE4 以防万一-环境是KDE4

Thanks in advance. 提前致谢。

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 (ie unset Qt::WindowTitleHint in the window's flags - either by using the (QWidget* parent, Qt::WindowFlags f) constructor or the setWindowFlags method). 如果要使用其他没有标题栏的普通窗口,请执行此操作,而不要制作工具窗口(即,在窗口的标志中未设置Qt :: WindowTitleHint)-通过使用(QWidget* parent, Qt::WindowFlags f)构造函数或setWindowFlags方法)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM