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. Detecting MouseClick on free area on screen
Forum Updated to NodeBB v4.3 + New Features

Detecting MouseClick on free area on screen

Scheduled Pinned Locked Moved General and Desktop
5 Posts 4 Posters 1.9k 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.
  • McLionM Offline
    McLionM Offline
    McLion
    wrote on last edited by
    #1

    Hi
    Can I somehow detect a MouseClick that occurs "somewhere" on the screen?
    It may include the area of the buttons on the screen or even better all of the area except the area covered and catched by the clicked slots of the buttons.
    Thanks
    McL

    1 Reply Last reply
    0
    • G Offline
      G Offline
      godbod
      wrote on last edited by
      #2

      Hello, this seems a bit unclear to me. Do you mean the MouseArea Inside a MouseArea problem ? If this is the problem I can solve it. Or just post a code or a picture to explain what you mean exactly.

      L'imagination est tout, c'est l’aperçu des futures attractions de la vie.

      1 Reply Last reply
      0
      • U Offline
        U Offline
        utcenter
        wrote on last edited by
        #3

        @McLion - if you want to be able to get mouse clicks from ANYWHERE, including outside of your application window you have to use the raw input operating system API. This also means the solution will not be portable, you will need different implementations if you want to run on different OS.

        1 Reply Last reply
        0
        • McLionM Offline
          McLionM Offline
          McLion
          wrote on last edited by
          #4

          I am developing for eLinux and I have a touchscreen that has some buttons to start some demo videos. If a video is started the video layer of the video HW of the SoC is set as top and if the video ends the graphic layer (which holds the Qt GUI) is set back on top.
          However, from the Qt application view, the touch/mouse is always active. Qt does not know that is not shown because it is not the active video output layer. Therefore, it permanently reacts on touches on the touchscreen. When an area of one of the (hidden behind the video) buttons is touched, I sure get that signal - normal ButtonClicked. What I need is to get a signal when the screen is touched "somewhere". I hope this makes it a bit clearer.

          1 Reply Last reply
          0
          • T Offline
            T Offline
            TioRoy
            wrote on last edited by
            #5

            I don't know Qt for Embedded Linux.... But you can try put buttons invisible (or a group - another "blank" window?) before start the video.

            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