Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.4.0
-
None
-
Windows 7
Description
Once I set a pressdelay on Listview, the onDoubleClicked signal of the delegate is not working.
ListView { id: connectionList anchors.fill: parent currentIndex: -1 pressDelay: 100 clip: true model: ListModel { ListElement { item: "Windows" } ListElement { item: "Mac" } ListElement { item: "Linux" } } delegate: Rectangle { width: parent.width height: 50 color: ListView.currentItem ? "blue" : "transparent" Text { id: item anchors { left: parent.left leftMargin: 20 verticalCenter: parent.verticalCenter } text: model.item } MouseArea { id: mouseArea anchors.fill: parent onDoubleClicked: { console.log("doubleclicked on delegate") } onClicked: { console.log("clicked on delegate") ListView.currentIndex = model.index; } } } }
When I tried doubleclicking the delegate item, it detected two clicks instead.