Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to detect OS lock event (e.g., SessionSwitch in Windows)
Qt 6.12 LTS is out! See what's new in the release blog

How to detect OS lock event (e.g., SessionSwitch in Windows)

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 763 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.
  • AaronCA Offline
    AaronCA Offline
    AaronC
    wrote on last edited by
    #1

    What's the best way to detect that the user has locked their session in Windows & Mac?

    I'm wanting to log users out of my application when they lock the OS.

    Thanks,
    Aaron

    1 Reply Last reply
    0
    • K Offline
      K Offline
      kuzulis
      Qt Champions 2020
      wrote on last edited by
      #2

      On windows - use service.

      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
      • Unsolved