Details
-
Suggestion
-
Resolution: Unresolved
-
P4: Low
-
None
-
5.5.0
-
None
-
Windows 8.1 Pro
Description
Executive summary: The documentation for pure QML Drag and Drop is pretty sparse and apparently incorrect. It could really use a rework!
Specific case: In the documentation for the Drag QML Type, Drag.mimeData claims that it takes a stringlist as its argument. However, I could only get it to work by passing it a json object - at least it looks like a json object, e.g.
Drag.dragType: Drag.Automatic // The following property value is (correctly) a stringlist Drag.keys: [ "application/x-mydatatype" ] // The following property value is definitely not a stringlist Drag.mimeData: { "application/x-mydatatype" : "the data as a string" } etc.
Is the data type wrong in the documentation? And why is there no additional information as to the necessary format of the json object? Furthermore, I expected the DropArea to be willing to accept any object with the correct matching key in Drag.keys. This is not the case. The DropArea refused to even acknowledge any dragged item (disallowing drop) unless the Drag.mimeData was correctly defined (as in the above example). This really made it very difficult to program in QML for Drag and Drop!