prepare for sleep function

Hello,


I am writing a C++ (Qt 5.7) class that should provide a cross platform event listener for the signal generated when the computer is going in standby.

For Linux and Windows OS I found the signals that are generated before going standby, but for Mac OS I didn't find the correct signal or the documentation that I have to read for this type of API.

To be more clear I need the equivalent of the function prepareForSleep() of the systemd of the Linux system.

thank you all in advance.

prepare for sleep function
 
 
Q