Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-992

Add support for drag-n-dropping non-existent files

    XMLWordPrintable

Details

    Description

      This is a use case that seems to have come up a number of times on the web:

      Someone is making an FTP client (or some other application in which you browse a remote directory) and want to be able to drag the file from the file browser and drop it into a native application like explorer or konqueror. I believe this can be considered standard functionality in e.g. an FTP client.

      The closest Qt can support in terms of mime types is a "text/uri-list". For Windows Explorer to accept the drag object, the URI needs to point to a local file, and it needs to exist. Platform specific code on Windows seems to use a special clipboard data type called CF_FILECONTENTS to achieve this, but this is not supported in Qt, and would not solve the problems on other platforms than Windows.

      Another possible solution might be to somehow be alerted in the application when the object has been dropped, so that you can stall the process until the file has been downloaded and placed in a local file. Overriding retrieveData() in QMimeData for this does not work, since this function is called while the object is dragged, and not just when it is dropped.

      Could we add some kind of API to Qt that makes it possible to solve this use case?

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            sorvig Morten Sørvig
            esabraha Eskil Abrahamsen Blomfeldt
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes