问题
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).
来源:https://stackoverflow.com/questions/13663582/qt-vs-xcb-how-powerful-is-qt-to-do-low-level-tasks