Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.8.2
-
None
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
- Run the draggable icons example
- Check that drag and drop works fine
- Note the winid from the console output
- Copy and paste the winid into the QML app
- Compile and run the QML app
- The draggable icons window should be embedded
- Drag and drop does not work