I'm working in a Windows environment. I have a program that needs to perform a function when the computer locks, whether it's by command + L or time-out. How can I get this? In a windows forum, they gave me the suggestion to use WM_WTSSESSION_CHANGE and then wParam WTS_SESSION_LOCK in the nativeEvent. The only thing is, you have to run WTSRegisterSessionNotification first. I can't run WTSRegisterSessionNotification, because it doesn't seem to exist when I try to call it in the constructor. Is there a way to do this using Qt or does anybody know how to get nativeEvent to see it?
Bookmarks