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 mouse click outside the application

How to detect mouse click outside the application

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 1.1k Views 1 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.
  • M Offline
    M Offline
    Miguel Reche
    wrote on last edited by
    #1

    Hello all, I want to detect when you click on the application mouse, alternating hide and show with each time you click outside the application

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Do you mean when the application looses focus ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      M 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi and welcome to devnet,

        Do you mean when the application looses focus ?

        M Offline
        M Offline
        Miguel Reche
        wrote on last edited by
        #3

        @SGaist yes, I need eventFilter or a method that listens for mouse events to be able to hide or show the application

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Why do you want to hide your application if somebody clicks outside of it ? And then how would you show it again ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          1
          • Vinod KuntojiV Offline
            Vinod KuntojiV Offline
            Vinod Kuntoji
            wrote on last edited by
            #5

            @Miguel-Reche ,

            Qt::pop flag will help you to hide your application if you click outside the application.

            C++, Qt, Qt Quick Developer,
            PthinkS, Bangalore

            1 Reply Last reply
            0

            • Login

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