I am trying to trap drag and drop events from the standard Apple address book app to my Qt app. This code works fine with Qt 4.4. on Mac OS X 10.4:
void
MyView::contentsDropEvent( QDropEvent* e )
{
QList<QUrl> urls = e->mimeData()->urls();
...
I can then use the URL to get the vCard. Marvellous.
But from Mac OS X 10.5 the apple address book no longer seems to support text/uri-list. So e->mimeData()->urls() returns an empty list. Worse still, e->mimeData()->formats() returns an empty list. How do I find out which vCards they dragged?
Here is a comment from a Nokia Qt engineer on this problem:
"Adressbook stopped providing drop data as text/uri-list compatible flavor data in OS 10.5. Not much we can do about that. The flavor they provide instead is 'public.vcard'. We could put up support for this as an implementation request, but my gut feeling is that this is too application specific, and can just as well be implemented by the app developer by subclassing QMacMimeData"
But there is no QMacMimeData in the Qt 4.4 or 4.5 documentation. Any ideas at how I can find out what they dragged?