Details
-
Suggestion
-
Resolution: Done
-
P4: Low
-
None
-
None
-
Microsoft Windows
Description
On Microsoft Windows, when dragging from some applications (e.g. an e-mail from MS Outlook) to a QWidget, the QDropEvent contains the Windows specific mime data application/x-qt-windows-mime;value="FileGroupDescriptorW" while the "FileContents" type is empty. So in order to get the actual file content, you would need to use WinAPI (MemoryStream and whatnot). But to do so you would need access to the internal handle pointer. Thus, the best solution would be an official Qt convenience method, that retrieves the data as QByteArray or QIODevice. Alternatively a method to get the handle pointer (Or maybe something like this already exists and I just didn't find it yet?)
Also compare https://forum.qt.io/topic/91413/ms-windows-qwidget-virtual-files-from-qdropevent-s-mimedata/2 , https://www.codeproject.com/Articles/28209/Outlook-Drag-and-Drop-in-C?msg=5523921#xx5523921xx and https://social.msdn.microsoft.com/Forums/office/en-US/b2e50357-a87c-4323-a851-5050b0e5b34b/not-able-to-get-filecontents-after-drop-on-form-occured?forum=outlookdev
Attachments
Issue Links
- relates to
-
QTBUG-93632 Find cross platform solution to QMimeData handling non-mime data
- Closed