Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Receiving touch-events anywhere on the screen and then passing them on
QtWS25 Last Chance

Receiving touch-events anywhere on the screen and then passing them on

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
qmltouchscreen
2 Posts 2 Posters 1.5k 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.
  • T Offline
    T Offline
    thealse
    wrote on last edited by thealse
    #1

    I have a qt 5.8 / qml QtQuick 2.4 application for single touchscreen devices.

    I would like to implement a function so that when the user has not touched anywhere on the screen for a certain time, the screen should dim down.

    I don't know how to implement a handler that receives all touches anywhere on the screen and then passes them on, not even sure if it is possible!

    I was thinking of putting a MouseArea covering the whole screen and then using the onPressed but I don't know to pass the touch-event on to the children underneath it.

    1 Reply Last reply
    0
    • B Offline
      B Offline
      benh
      wrote on last edited by
      #2

      For your screen mouse area, have you tried this?

          MouseArea {
              anchors.fill: parent
              onPressed:
              {
                  // your stuff here, e.g. global timeout reset
                  mouse.accepted = false;
              }
          }
      
      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