Qt World Summit: Register Today!

Register user inactivity in qml

  • Is there a way to register if the user is inactive?
    I need to logout the user if he's inactive for 5 minutes.
    Does Qt provide an easy solution for this or do I have to set up a timer on my own?

  • Moderators

    you could install an event filter on the QApplication instance and restart your timer on every mouse and key event (maybe also touch events). You might also listen to QEvent::ApplicationActivate/QEvent::ApplicationDeactivate events, but i don't know if they are also triggered on mobile platforms?


Log in to reply