I am trying to figure out how to drag items to another windows application. In particular in this case I want to be able to drag items into a winamp playlist.

For all of this I am using pyqt4.

To start out with I am using a QDirModel with a QColumnView widget. I have dragging enabled and when I attempt to drag a file the mimeData given for the drag is "text/uri-list" (the default). While explorer can handle this drag, when I try to drag the item into winamp the url shows up in the playlist but it can't do anything with it (it doesn't seem to recognize it as a file).

How can I get this to work?

It would seem to me that QWindowsMime might be what I want in order to get a native windows object for the drag, but that does not exist (at least as far as I can see) in pyqt4.

Is there some other mime type that I can add to drag (by reimplementing mimeData in my QDirModel) that would make winamp understand the drag?

Another question that is related is that when I drag a file into Qt from windows there is a mime type 'application/x-qt-windows-mime;value="FileName"' in the mimeData object. Does this mime type have any meaning when dragging out of Qt?

Thanks far any help on this, I am new to pyqt (and windows programming in general) and I am not able to find much help on this stuff on the web.


- amicitas