Important: Please read the Qt Code of Conduct -

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

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

  • For your screen mouse area, have you tried this?

        MouseArea {
            anchors.fill: parent
                // your stuff here, e.g. global timeout reset
                mouse.accepted = false;

Log in to reply