当应用程序变为非活动时,Qt ::工具窗口出现 [英] Qt::Tool window diasappears when application become inactive

查看:1275
本文介绍了当应用程序变为非活动时,Qt ::工具窗口出现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当应用程序变为非活动状态时,保持Qt :: Tool窗口可见会有问题。应用程序正在运行,有2个窗口打开 - 主和附加与Qt ::工具标志设置。当我打开/切换到其他应用程序,例如Konosole主窗口保持可见,但第二个消失 - 所以如果我想要例如。将一些数据从工具窗口重写到一个文档,我需要保持在它们之间切换。

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.

Qt :: ToolTip 没有这样的问题,但看起来不一样。

There is no such problem with Qt::ToolTip but it looks different.

我也尝试过 setAttribute(Qt :: WA_MacAlwaysShowToolWindow,true)但是因为我运行Linux与KDE4它没有帮助。另外 Qt :: WindowStaysOnTopHint 不是我想得到的。

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?

提前感谢。

推荐答案

好的,但是无法通过修改代码修复它,因为它似乎是一个窗口管理器设置,你应该能够在KDE控制中心调整。

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.

我没有安装KDE 4,所以我不知道设置在哪里,但在KDE 3.5控制中心,如果你看下桌面 - > 窗口行为,然后单击高级选项卡,您可以取消选中名为用于非活动应用程序的窗口,以使工具窗口可见。希望在KDE 4控制中心有一个类似的设置。

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 the Advanced tab, you can un-check a box called Hide utility windows for inactive applications to keep your tool window visible. Hopefully, there's a similar setting in the KDE 4 Control Center.

这篇关于当应用程序变为非活动时,Qt ::工具窗口出现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆