Compare commits
1 Commits
work/test-
...
work/fuf/d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a61976ae91 |
@@ -105,6 +105,10 @@ TimelineContainer {
|
|||||||
Layout.preferredHeight: imageHeight
|
Layout.preferredHeight: imageHeight
|
||||||
source: root.mediaInfo.source
|
source: root.mediaInfo.source
|
||||||
|
|
||||||
|
Drag.active: dragHandler.active
|
||||||
|
Drag.dragType: Drag.Automatic
|
||||||
|
Drag.supportedActions: Qt.CopyAction
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
source: root.mediaInfo.tempInfo.source
|
source: root.mediaInfo.tempInfo.source
|
||||||
@@ -141,6 +145,28 @@ TimelineContainer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
anchors.fill: parent
|
||||||
|
|
||||||
|
DragHandler {
|
||||||
|
id: dragHandler
|
||||||
|
enabled: img.status === Image.Ready
|
||||||
|
|
||||||
|
onActiveChanged: {
|
||||||
|
if (active) {
|
||||||
|
img.grabToImage((result) => {
|
||||||
|
img.Drag.mimeData = {
|
||||||
|
"image/png": result.image,
|
||||||
|
};
|
||||||
|
img.Drag.active = dragHandler.active;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
img.Drag.active = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
TapHandler {
|
TapHandler {
|
||||||
acceptedButtons: Qt.LeftButton
|
acceptedButtons: Qt.LeftButton
|
||||||
onTapped: {
|
onTapped: {
|
||||||
|
|||||||
Reference in New Issue
Block a user