Important: Please read the Qt Code of Conduct -

Drop files to OS folders from Qt application

  • Hello,

    I am trying to implement dragging a file from my application to an OS folder, which should be a file copy action. But when I do the following, I get a 'Untitled clipping' in my OS folder. Does anybody know what I've done wrong here? Thanks!

    @Item {
    id: draggable
    anchors.fill: parent
    Drag.hotSpot.x: 0
    Drag.hotSpot.y: 0
    Drag.mimeData: { "text/uri-list": ["file:///Users/xxx/Documents/test.rtf"]}
    Drag.proposedAction: Qt.CopyAction
    Drag.dragType: Drag.Automatic
    Drag.onDragStarted: {
    Drag.onDragFinished: {
    } @

Log in to reply