Mouse PressAndHold



  • Is it possible to disable pressandhold so that no matter how long a mouse area is pressed, I get a clicked signal when released?



  • In my understanding this is exact what onClicked does. From the online documentation:

    "A click is defined as a press followed by a release, both inside the MouseArea (pressing, moving outside the MouseArea, and then moving back inside and releasing is also considered a click)."

            MouseArea {
                anchors.fill: parent
                onClicked: console.log("released")
                onPressed:  console.log("pressed")
            }
    

Log in to reply
 

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