Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QMimeData::setUrls() and macOS 10.15 (Catalina)
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 1 Posters 288 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Thuan_FirelightT Offline
    Thuan_FirelightT Offline
    Thuan_Firelight
    wrote on last edited by Thuan_Firelight
    #1

    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();
    data->setUrls(listOfUrls);
    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.

    1 Reply Last reply
    0
    • Thuan_FirelightT Offline
      Thuan_FirelightT Offline
      Thuan_Firelight
      wrote on last edited by Thuan_Firelight
      #2

      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 https://bugreports.qt.io/browse/QTBUG-71939

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved