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 ?

How to detect system idle time in Qt ?

Scheduled Pinned Locked Moved Unsolved General and Desktop
qt6qtcreator
4 Posts 2 Posters 562 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 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 ?

    jsulmJ 1 Reply Last reply
    0
    • A animeshdhakal

      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 ?

      jsulmJ Online
      jsulmJ Online
      jsulm
      Lifetime Qt Champion
      wrote on 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 last edited by
        #3

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

        jsulmJ 1 Reply Last reply
        0
        • A animeshdhakal

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

          jsulmJ Online
          jsulmJ Online
          jsulm
          Lifetime Qt Champion
          wrote on 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

          • Login

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