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

QML Drag.startDrag() does not work at all on EGLFS

    XMLWordPrintable

Details

    • Linux/Yocto

    Description

      Calling Drag.startDrag (https://doc.qt.io/qt-5/qml-qtquick-drag.html#startDrag-method)

      always crashes on EGLFS because it is attempted to create a QRasterWindow which is not possible on EGLFS platform. Hence, the app says goodbye with "EGLFS: OpenGL windows cannot be mixed with others." Backtrace is attached.

      The QRasterWindow is used for the Drag icon, but even if I do not have a drag icon and the pixmap of the raster window is empty, the window will be created (there is a TODO in gui/kernel/qsimpledrag.cpp // ### TODO Check if its really necessary to have m_drag_icon_window
      // when QDrag is used without a pixmap - QDrag::setPixmap())

      I am working on a customer project where they have parametrise machine settings via Drag and Drag and it stops them from getting the machines to be delivered.
      However, I have a workaround for the specific customer in place: You need to apply the attached patch to qtbase and use the DragImageItem, a QQuickPaintedItem which I wrote to have a replacement for the drag icon. Note that the patch is just a workaround for the customer, a real fix for Qt it is not that trivial since the raster window needs to be replaced with an OpenGL surface.

       

      Attachments

        1. 0001-QBasicDrag-Only-create-QShapedPixmapWindow-when-drag.patch
          4 kB
          Michael Winkelmann
        2. application-output__prc7hmi_svn_rev_544___crash_on_drag_and_drop_fahrsatz.txt
          3 kB
          Michael Winkelmann
        3. backtrace__prc7hmi_svn_rev_544___crash_on_drag_and_drop_fahrsatz.txt
          6 kB
          Michael Winkelmann
        4. dragimageitem.cpp
          2 kB
          Michael Winkelmann
        5. dragimageitem.h
          0.6 kB
          Michael Winkelmann
        6. dragndrop_bug_internal_drag.zip
          323 kB
          Michael Winkelmann
        7. dragndrop_bug.zip
          318 kB
          Michael Winkelmann

        Activity

          People

            lagocs Laszlo Agocs
            michaelwinkelmann Michael Winkelmann
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: