Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. DragLeaveEvent and file copy
Forum Updated to NodeBB v4.3 + New Features

DragLeaveEvent and file copy

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 566 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    scayetanot
    wrote on last edited by
    #1

    Hi,

    I'm developing an app to be able to display files located on an Android device. the App is done in C++ and Qt and must also be able to transfer file between android and my mac osx.

    Currently, I have implemented what is needed to support the drag and drop and I can triggered the DragLeaveEvent.
    When I'm release the left button of the mouse after leaving the app with a file selected to move it from app to the mac osx, a textClipping file is created with the name of the file I want to move.

    Which class need to be subclass to bypass this file create and create my own. MTP provide a copy from android to local storage API but I still not find where to add this API.

    I was thinking the clipboard but not method gave me the piece of code who manage the .textClipping file creation and secondly when moving out of the app, how to get the destination such as "Desktop", or when moving Finder the folder I select.

    The normal behavior works as when dragging a file from the app to the finder, create a file at the location I expect but it's not the right file. The file created is not my file but the .textClipping file which contain the name of my file inside.

    Any idea, where I had to change to support a custom copy API instead of the normal creation of the text clipping file ?
    Thanks

    1 Reply Last reply
    0
    • S Offline
      S Offline
      scayetanot
      wrote on last edited by
      #2

      For information it's a treewidget and Treewidgetitem used

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved