Yes, I can give you some guidance on how to manage drag-and-drop for multiple pages in QML:
Rectangle {
id: page1DragDropArea
width: 200
height: 200
drag.target: true
drop.target: true
// other properties
}
Rectangle {
id: page2DragDropArea
width: 200
height: 200
drag.target: true
drop.target: true
// other properties
}
Rectangle {
id: item1
width: 50
height: 50
// other properties
}
Rectangle {
id: item2
width: 50
height: 50
// other properties
}
// other items
page1DragDropArea.onDrag: {
draggedItem.source = item1;
draggedItem.position.x = item1.x;
draggedItem.position.y = item1.y;
}
page2DragDropArea.onDrop: {
if (draggedItem.source.id === "item1") {
item1.position.x = draggedItem.position.x;
item1.position.y = draggedItem.position.y;
} else if (draggedItem.source.id === "item2") {
item2.position.x = draggedItem.position.x;
item2.position.y = draggedItem.position.y;
}
}
// other onDrag and onDrop functions
DragHandler {
target: page1DragDropArea
delegate: Rectangle {
width: 50
height: 50
color: "red"
}
}
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2022-10-16 11:00:00 +0000
Seen: 11 times
Last updated: Dec 17 '21
What is Twitter Pagination expressing in other words?
What are the steps to implement dark mode and merge two distinct web pages into a single one?
How can I extract information from additional pages on a Google Scholar profile?
What is the meaning of pages error in ckan.plugins.core.PluginNotFoundException?
"Is it possible to have multiple links for the next page on a single webpage?"
Is it mandatory for all pages to be CSR when using the new app directory in NextJS 13 with MUI?