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. Detect user activity?
Qt 6.11 is out! See what's new in the release blog

Detect user activity?

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 324 Views 2 Watching
  • 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.
  • D Offline
    D Offline
    Dan203
    wrote on last edited by
    #1

    Is there some way to detect global user activity from Qt? Like have an app sitting in the tray that can start a timer when the user moves the mouse or touches the keyboard and then stop that timer when there is no input for say 5 minutes?

    I've done this before on Windows using global hooks, but I don’t think that's a thing on Mac/Linux and I want to make the app cross platform.

    It doesn’t need to get the exact keys or mouse coordinates, just that they have or haven’t been touched. Or even just a generic message saying there was some sort of user input.

    1 Reply Last reply
    0
    • Kent-DorfmanK Offline
      Kent-DorfmanK Offline
      Kent-Dorfman
      wrote on last edited by
      #2

      not in a platform neutral manner. Look at screensaver sourcecode. That does what you are looking for,

      The dystopian literature that served as a warning in my youth has become an instruction manual in my elder years.

      1 Reply Last reply
      1

      • Login

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