树点击选不中问题
Some checks are pending
Gallery App Build / macOS (push) Waiting to run
Gallery App Build / Windows (push) Waiting to run
Gallery App Build / Ubuntu (push) Waiting to run

This commit is contained in:
yxdy 2025-03-07 18:04:16 +08:00
parent e80655c327
commit 9debdc84b8

View File

@ -180,11 +180,11 @@ ScrollView {
anchors.fill: parent anchors.fill: parent
drag.target: dragRect drag.target: dragRect
onPressed: { onPressed: {
timer.startTimer(() => { // timer.startTimer(() => {
view.start_drag = true view.start_drag = true
dragRect.Drag.active = true dragRect.Drag.active = true
dragRect.Drag.source = dragRect dragRect.Drag.source = dragRect
}, 100) // }, 100)
} }
onReleased: { onReleased: {
timer.stopTimer(()=> { timer.stopTimer(()=> {
@ -201,12 +201,12 @@ ScrollView {
currentItem = model currentItem = model
console.log("click modelId =" + model.id) console.log("click modelId =" + model.id)
} }
hoverEnabled: true // hoverEnabled: true
onEntered: { // onEntered: {
// console.log(rowfill_cur.mapToItem(view, 0, 0).x) // // console.log(rowfill_cur.mapToItem(view, 0, 0).x)
} // }
onExited: { // onExited: {
} // }
} }
Drag.active: mouseArea.drag.active Drag.active: mouseArea.drag.active