Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Qt::Tool我的标志有问题。当我创建带有Qt::Tool标志的新小部件时,它会出现在主窗口的顶部。但是当我切换回主窗口并使其处于活动状态时,我仍然在前面有工具小部件,因此我的主窗口不完全可见。
Qt::Tool
Qt::WindowStaysOnTopHint不活跃。以防万一 - 环境是 KDE4
Qt::WindowStaysOnTopHint
提前致谢。
这就是工具窗口的重点——自动保持在顶部。如果您想要一个正常的窗口但没有标题栏,请这样做而不是制作工具窗口(即在窗口的标志中取消设置 Qt::WindowTitleHint - 通过使用(QWidget* parent, Qt::WindowFlags f)构造函数或setWindowFlags方法)。
(QWidget* parent, Qt::WindowFlags f)
setWindowFlags