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 check if mouse button is pressed anywhere on screen , even outside of my mainwindow?

How to check if mouse button is pressed anywhere on screen , even outside of my mainwindow?

Scheduled Pinned Locked Moved Solved General and Desktop
c++mouse eventsfocus issuemouse control
3 Posts 2 Posters 1.1k 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.
  • L Offline
    L Offline
    learnist
    wrote on 8 Sept 2020, 19:23 last edited by
    #1

    Is it possible to detect mouse buttons pressed inside and outside of my application window in Qt, i guess there is a way to detect mouse clicks inside my application window , but what about detecting clicks inside+outside of main window ?

    R 1 Reply Last reply 8 Sept 2020, 19:28
    0
    • L learnist
      8 Sept 2020, 19:23

      Is it possible to detect mouse buttons pressed inside and outside of my application window in Qt, i guess there is a way to detect mouse clicks inside my application window , but what about detecting clicks inside+outside of main window ?

      R Offline
      R Offline
      raven-worx
      Moderators
      wrote on 8 Sept 2020, 19:28 last edited by
      #2

      @learnist
      Not directly with Qt.
      The only thing which comes close to it is to create a transparent window spanning widget and dont accept the mouse event in the handler.

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      L 1 Reply Last reply 8 Sept 2020, 19:29
      2
      • R raven-worx
        8 Sept 2020, 19:28

        @learnist
        Not directly with Qt.
        The only thing which comes close to it is to create a transparent window spanning widget and dont accept the mouse event in the handler.

        L Offline
        L Offline
        learnist
        wrote on 8 Sept 2020, 19:29 last edited by
        #3

        @raven-worx Thanks for the answer

        1 Reply Last reply
        0

        1/3

        8 Sept 2020, 19:23

        • Login

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