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. TextField vs MouseArea clicking event difference
Forum Updated to NodeBB v4.3 + New Features

TextField vs MouseArea clicking event difference

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 88 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.
  • S Offline
    S Offline
    shokarta
    wrote on last edited by
    #1
    MouseArea {
        onClicked: { console.log("clicked") }
        onPressAndHold: { console.log("pressAndHold") }
        onReleased: { console.log("released") }
    }
    

    when holding, it only shows "pressAndHold" and on release it shows "released", and when singleclick it shows "clicked" and "released"... this is correct behaviour

    TextField {
        onPressed: { console.log("pressed") }
        onPressAndHold: { console.log("pressAndHold") }
        onReleased: { console.log("released") }
    }
    

    when holding, it first shows first "press" and after that it shows "pressAndHold" and on release it dost not show anything (it shall shows "released") !!!, and when singleclick it shows "pressed" and "released"

    In best case scenario, I would like the TextField to behave the same way as MouseArea... is this by design?
    is there a way to set the TextField mouseclicks events the same way as MouseArea?

    this behaviour is in 6.6.1, win64 build, tested on Android emulator as well as MinGW

    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