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. Mouse PressAndHold
Qt 6.11 is out! See what's new in the release blog

Mouse PressAndHold

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
mouseareabuttons
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.
  • msingerM Offline
    msingerM Offline
    msinger
    wrote on last edited by
    #1

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

    1 Reply Last reply
    0
    • I Offline
      I Offline
      istvan
      wrote on last edited by istvan
      #2

      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")
              }
      
      1 Reply Last reply
      1

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved