Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-132619

[macOS] Drag and Drop not working : cannot grab icos in Draggable Icons example

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P1: Critical
    • 6.9.0 Beta2
    • 6.9.0 Beta1
    • GUI: Drag and Drop
    • macOS

    Description

      Draggable Icons example app does not work with Qt 6.9.0 beta1 on macOS while it works Qt 6.8.1.

      How to reproduce the issue : 

      1. Run Draggable Icons example application with Qt 6.9.0 beta1 on macOS.
      2. Try to drag any icons on the window. You will not be able to drag any of them.

       

      This issue is reproduced with Qt 6.9.0 beta 1 built from source as well, and if you apply the workaround below, the issue will be solved somehow.

      <qtbase/src/corelib/kernel/qcore_mac_p.h>

       

      void trackObjectLifetime()
      {
       	if (!m_object)
      		return;
      
      	auto *lifetimeTracker = [WeakPointerLifetimeTracker new];
      
      	lifetimeTracker.pointer = reinterpret_cast<QObjCWeakPointer<NSObject>*>(this);
      
      	NSObject * wtf = m_object; // <— added by jaf
      
      objc_setAssociatedObject(m_object, this, lifetimeTracker, OBJC_ASSOCIATION_RETAIN); // <—— somehow this sets m_object to NULL!!! --jaf
      
      	m_object = wtf; // <— added by jaf
      
      	[lifetimeTracker release];
      }

       

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            vestbo Tor Arne Vestbø
            hitoshiito Hitoshi Ito
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes