QWidget / X11: Prevent window from beeing activated/focussed by mouse clicks

帅比萌擦擦* 提交于 2020-01-13 10:53:48

问题


I would like to develop a system-wide onscreen keyboard in Qt/QML. Injecting key-events via xlib works fine.

My problem now: If a keyboard-button is clicked, the window with the selected input field will lose the focus. In consequence, the key event will not be delivered to the previously selected input field.

So does anybody know how to prevent a QWidget from beeing activated/focussed by mouse-clicks? Every hint is welcome and a code examples would be great!

Thank you very much in advance, Frime

来源:https://stackoverflow.com/questions/29097363/qwidget-x11-prevent-window-from-beeing-activated-focussed-by-mouse-clicks

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