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

Cannot drop into WindowContainer

    XMLWordPrintable

Details

    • Linux/X11

    Description

      When using WindowContainer to embed a foreign window, it is not possible to drop into the foreign window.

      This can be tested by using the draggable icons example as a foreign window,
      jut add qDebug() << mainWidget.winId(); to get it's win id before app.exec().

      Then in a QML app:

      engine.rootContext()->setContextProperty("externalWindow", QWindow::fromWinId(<winId from dragable icons example>));
      
      import QtQuick
      
      Window {
          width: 640
          height: 480
          visible: true
          title: qsTr("Hello World")
      
          Rectangle{
            anchors.fill:parent
            color: 'red'
      
            WindowContainer{
              anchors.fill:parent
              anchors.margins:8
              window: externalWindow
            }
          }
      }
      

      Steps

      1. Run the draggable icons example
      2. Check that drag and drop works fine
      3. Note the winid from the console output
      4. Copy and paste the winid into the QML app
      5. Compile and run the QML app
      6. The draggable icons window should be embedded
      7. Drag and drop does not work

      Attachments

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

        Activity

          People

            vestbo Tor Arne Vestbø
            bterrier Benjamin Terrier
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes