Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to detect system idle time in Qt ?
QtWS25 Last Chance

How to detect system idle time in Qt ?

Scheduled Pinned Locked Moved Unsolved General and Desktop
qt6qtcreator
4 Posts 2 Posters 550 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    animeshdhakal
    wrote on 13 Jul 2022, 06:49 last edited by animeshdhakal
    #1

    I want to get system idle time. In electron I used to get the system idle time using the function

    powerMonitor.getSystemIdleState()
    

    https://www.electronjs.org/docs/latest/api/power-monitor

    How can I have this similar implementation in Qt ?

    J 1 Reply Last reply 13 Jul 2022, 06:56
    0
    • A animeshdhakal
      13 Jul 2022, 06:49

      I want to get system idle time. In electron I used to get the system idle time using the function

      powerMonitor.getSystemIdleState()
      

      https://www.electronjs.org/docs/latest/api/power-monitor

      How can I have this similar implementation in Qt ?

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 13 Jul 2022, 06:56 last edited by
      #2

      @animeshdhakal As far as I know there is nothing for this in Qt. But you could use Electron also in a Qt application I guess (I have no idea about Electron)?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • A Offline
        A Offline
        animeshdhakal
        wrote on 13 Jul 2022, 07:25 last edited by
        #3

        So Is there any way to detect User Input for a period of time ?

        J 1 Reply Last reply 13 Jul 2022, 07:28
        0
        • A animeshdhakal
          13 Jul 2022, 07:25

          So Is there any way to detect User Input for a period of time ?

          J Offline
          J Offline
          jsulm
          Lifetime Qt Champion
          wrote on 13 Jul 2022, 07:28 last edited by
          #4

          @animeshdhakal User input where? In your app or system-wide? System-wide is not possible with Qt. For your app you can do that with https://doc.qt.io/qt-6/eventsandfilters.html

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          2

          2/4

          13 Jul 2022, 06:56

          • Login

          • Login or register to search.
          2 out of 4
          • First post
            2/4
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved