Qt::Tool window diasappears when application become inactive

你说的曾经没有我的故事 提交于 2019-12-08 14:10:32

问题


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.


回答1:


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



来源:https://stackoverflow.com/questions/2319105/qttool-window-diasappears-when-application-become-inactive

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!