Qt4:使全屏窗口无法绕开(锁定屏幕)? [英] Qt4: Making fullscreen window impossible to get around (a lock screen)?
问题描述
我的应用程序是一个操作系统锁定屏幕(例如GDM的锁定屏幕或KDE的锁定屏幕),所以我试图使其功能像一个.
My application is an OS lock screen (like GDM's lock screen or KDE's), so I'm trying to make it function like one.
我试图将应用程序的窗口悬停在所有所有窗口上方,并禁用/拦截所有键盘快捷键( ALT-TAB
, CTRL-ALT-D
等),导致它消失.
I am trying to make my application's window hover above all other windows and disable/intercept all keyboard shortcuts (ALT-TAB
, CTRL-ALT-D
, etc.) that would cause it disappear.
有没有办法做到这一点?我有100%的肯定,因为存在带有GUI的锁屏,但我只是找不到寻找的地方...
Is there any way to do this? I'm 100% sure there is, as lock screens with GUIs exist, but I just can't find the place to look...
推荐答案
我不知道如何使用Qt进行操作,但是您正在寻找的被称为指针输入设备和
I don't know how to do it with Qt, but what you are looking for is called grabbing. You can grab the pointer input device as well as the keyboard.
:查看Qt4文档,您是否尝试过使用 QWidget :: grabMouse ?看起来此功能完全可以满足您的要求.
Looking in to the Qt4 docs, have you tried to use QWidget::grabMouse? It looks like this function does exactly what you want.
这篇关于Qt4:使全屏窗口无法绕开(锁定屏幕)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!