Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.7.1, 5.9.0, 5.9.1
-
None
-
Mac OS X El Capitan
Qt 5.9.1
MacBook Pro
Description
When I create a QWidget object using createWindowContainer that has qml scene embedded into a QQuickView instance, i.e.
QWidget* wig = QWidget::createWindowContainer(quickView, 0, Qt::Window);
then
// this is to support drag and drop wig->setAcceptDrops(true); wig->installEventFilter(this);
then adding the following method to myClass to intercept events on wig
bool myclass::eventFilter(QObject *obj, QEvent *event){ }
It seems that the events related to mouse events like drag and drop are not being sent to eventFilter virtual function. i.e. QMouseEvent, QDragEnter, QDropEvent...etc.
When only I switch to a QQuickWidget instanct i.e.
QQuickWidget* view = new QQuickWidget; view->setSource(QUrl("qrc:/res/purple.qml")); view->setAcceptDrops(true); view->installEventFilter(this);
I am able to track mouse, drag, drop events normally.
I've tested the above scenario on Windows 10 and Ubuntu 16.10 along with Qt 5.7.1 and both of them are working fine, I've been able to track mouse and drag/drop events from a QWidget created by QWidget::createWindowContainer.
The problem happens only on Mac OS X, I've tested it on (El Capitan and Sierra).
I've attached a working example that demonstrates the issue