当应用程序变为非活动状态时,Qt::工具窗口消失
当应用程序变为非活动状态时,我无法保持 Qt::Tool 窗口可见。应用程序正在运行,并且打开了 2 个窗口 - 主窗口和附加窗口,并且设置了 Qt::Tool 标志。当我打开/切换到其他应用程序(例如 Konosole)时,主窗口仍然可见,但第二个窗口消失 - 因此,如果我想将一些数据从工具窗口重写到文档中,我需要在它们之间不断切换。
Qt::ToolTip
不存在这样的问题,但看起来不同。
我也尝试过 setAttribute(Qt::WA_MacAlwaysShowToolWindow,true) ,但由于我使用 KDE4 运行 Linux,所以它没有帮助。另外 Qt::WindowStaysOnTopHint
也不是我想要得到的。
有什么办法让它保持可见吗?
提前致谢。
I have problem with keeping Qt::Tool window visible when the application becomes inactive. The application is running and there are 2 windows opened - main and additional with Qt::Tool flag set. When I open/switch to other app e.g Konosole the main window remains visible but second disappears - so if I want to e.g. rewrite some data from the tool window to a document I need to keep switching between them.
There is no such problem with Qt::ToolTip
but it looks different.
I've also tried setAttribute(Qt::WA_MacAlwaysShowToolWindow,true)
but since I'm running Linux with KDE4 it doesn't help. Also Qt::WindowStaysOnTopHint
is not what I'm trying to get.
Is there any way to keep it visible?
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我也遇到了这个问题,但无法通过修改代码来修复它,因为它似乎是一个窗口管理器设置,您应该能够在 KDE 控制中心中进行调整。
我没有安装 KDE 4,所以我不确定设置在哪里,但在 KDE 3.5 控制中心中,如果您查看
桌面
->窗口行为,然后单击“高级”选项卡,您可以取消选中“隐藏非活动应用程序的实用工具窗口”复选框,以保持工具窗口可见。希望 KDE 4 控制中心中也有类似的设置。
I ran into this problem as well, but wasn't able to fix it by modifying code since it seems to be a window manager setting, which you should be able to tweak in KDE Control Center.
I don't have KDE 4 installed so I'm not sure where the setting is there, but in the KDE 3.5 Control Center, if you look under
Desktop
->Window Behavior
and then click on theAdvanced
tab, you can un-check a box calledHide utility windows for inactive applications
to keep your tool window visible. Hopefully, there's a similar setting in the KDE 4 Control Center.