This commit is contained in:
zhuzichu
2023-10-19 15:25:07 +08:00
parent 4d197d2697
commit ac63514451
9 changed files with 4 additions and 159 deletions

View File

@ -463,10 +463,6 @@ Item {
leftMargin: 6
rightMargin: 6
}
Drag.active: item_mouse.drag.active
Drag.hotSpot.x: item_control.width / 2
Drag.hotSpot.y: item_control.height / 2
Drag.dragType: Drag.Automatic
onClicked:{
if(type === 0){
if(model.onTapListener){
@ -496,18 +492,6 @@ Item {
id:item_mouse
anchors.fill: parent
acceptedButtons: Qt.RightButton | Qt.LeftButton
drag.target: item_control
onPositionChanged: {
parent.grabToImage(function(result) {
parent.Drag.imageSource = result.url;
})
}
drag.onActiveChanged:
if (active) {
parent.grabToImage(function(result) {
parent.Drag.imageSource = result.url;
})
}
onClicked:
(mouse)=>{
if (mouse.button === Qt.RightButton) {
@ -860,15 +844,6 @@ Item {
}
}
}
DropArea{
anchors.fill: loader_content
onDropped:
(drag)=>{
if(drag.source.modelData){
drag.source.modelData.dropped(drag)
}
}
}
Loader{
id:loader_content
anchors{

View File

@ -25,6 +25,4 @@ QtObject {
property Component editDelegate
property bool showEdit
signal tap
signal dropped(var drag)
}