Important: Please read the Qt Code of Conduct -

QMimeData::setUrls() and macOS 10.15 (Catalina)

  • Has anyone encountered an issue with drag and drop and macOS 10.15? In my software I have a tree view which on drag, we return a QMimeData with multiple urls. This seems to break the mouse drag and drop on macOS 10.15. If I only push a single url onto the QMimeData it works fine. This used to be a problem on earlier builds of macOS 10.14 as well and it seems to be patched by Apple. Just curious why this feature is so fragile or is there something I need to set on the QMimeData besides the urls (e.g setting a plain text version of the uris). Below is a snippet of what my code looks like:

    QMimeData* data = new QMimeData();
    return data;

    I tried changing my code to QMimeData::setText() and using a comma separator strings and it works fine, but would prefer urls since that would work if user was dragging from Finder into my software.

  • Some additional information.

    I am seeing this error in Xcode with both Qt 5.4.1 and Qt 5.12.3. The issue only occurs when multiple urls are set on the QMimeData. A single url works fine.

    There are 3 items on the pasteboard, but 1 drag images. There must be 1 draggingItem per pasteboardItem.

    Looks like this is reported under

Log in to reply