Detecting MouseClick on free area on screen



  • 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



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



  • @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.



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



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


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.