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. How to remove the dbclick event on mousearea control

How to remove the dbclick event on mousearea control

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 2 Posters 674 Views 1 Watching
  • 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.
  • M Offline
    M Offline
    Mr .Wu
    wrote on last edited by
    #1

    How to remove the dbclick event on mousearea control

    1 Reply Last reply
    0
    • EddyE Offline
      EddyE Offline
      Eddy
      wrote on last edited by
      #2

      Hi,

      You could use a timer like this :

      Window {
          visible: true
          width: 640
          height: 480
      
          MainForm {
              anchors.fill: parent
              Timer{
                  id:timer
                  interval: 300
                  onTriggered: console.log("'Clicked on background. ")
              }
              mouseArea.onClicked: {
                  if(timer.running)
                  {
                      timer.stop()
                  }
                  else
                      timer.restart()
              }
          }
      }
      

      This way nothing is going to happen when you doubleclick but still does something when just clicking once.

      Eddy

      Qt Certified Specialist
      www.edalsolutions.be

      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