Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-96637

Provide signals for system power events

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • None
    • QPA
    • None
    • The chance of this being added to QCoreApplication is near zero. Reassigning to the GUI parts.

    Description

      Qt does not provide a platform-independent way to detect when the host machine enters or leaves sleep mode. This currently requires writing platform-specific code.

      It would be nice if Qt could provide some signals that are emitted when various power-related events occur. Those signals should be available to a QCoreApplication and not require a QApplication or QuiApplication.

      Since QCoreApplication already has a signal called "aboutToQuit", another signal called "aboutToSleep" can be added to signal that the system is entering sleep mode. There also needs to be a signal that indicates 'wake-up after sleep' because the application needs to know that normal operation can be resumed. Maybe call this "resumedAfterSleeping" or something similar. Or alternatively, the two signals can be combined into one signal with one bool/enum parameter that indicates if it is before or after sleeping.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              vestbo Tor Arne Vestbø
              hyperquantum Kevin André
              Votes:
              5 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes