I'm trying to create a program to lock the screen of a computer with Linux OS which is to be unlocked using my own authentication mechanism. Can I do it in Qt alone( The lock screen, the ability to switch to the lock screen ...) or do I need to learn XCB or something related?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Window or session management like locking the screen isn't covered by Qt. You'll need to use native API.
Usually locking the screen isn't something random applications do, but something the desktop environment offers to the user. Thus covering such tasks in a UI toolkit doesn't make much sense. (Same goes for administration-related tasks, like configuring network interfaces).