Details
-
Bug
-
Resolution: Done
-
P0: Blocker
-
5.9
-
None
-
f6313ef4c29a0efa45667dca9c513508466ad250 (qtdeclarative/5.9.4, 17.1.2018, 5.9.4)
Description
Consider:
#include <QApplication> #include <QDockWidget> #include <QQuickWidget> #include <QMainWindow> #include <QTimer> class MainWindow : public QMainWindow { Q_OBJECT public: explicit MainWindow(QWidget *parent = 0) : QMainWindow(parent) { resize(1024, 1024); QWidget *dock = new QWidget(this); QQuickWidget *quick = new QQuickWidget(dock); quick->setSource(QUrl("qrc:/main.qml")); dock->setFocusProxy(quick); dock->move(512, 512); } }; int main(int argc, char *argv[]) { QApplication a(argc, argv); MainWindow w; w.show(); return a.exec(); } #include <main.moc>
and
import QtQuick 2.0 Rectangle { width: 500 height: 500 color: "green" MouseArea { anchors.fill: parent onClicked: console.log("clicked") } }
Clicking on the green rectangle should trigger "clicked" console messages but doesn't. When the "dock->move(512, 512);" line is removed the green rectangle is in the top left of the window and clicking on it triggers the messages.
This is because https://codereview.qt-project.org/#/c/213030/ changed the coordinates of mouse events sent to QQuickWidget. Previously localPos was also assumed as windowPos, now the original windowPos of the event is passed, which doesn't fit the offscreen Quick Window.
Attachments
Issue Links
- is duplicated by
-
QTBUG-65807 5.9.4 snapshot breaks QQuickWidget mouse inputs (MouseArea)
- Closed
- is required for
-
QTBUG-66112 [REG 5.10.0 -> 5.10.1] No mouse interaction with Qt Quick based UIs
- Closed
-
QT3DS-992 Qt bugs that impact Qt 3D Studio editor
- Closed
- resulted from
-
QTBUG-64241 Synthetic mouse events marked as MouseEventNotSynthesized
- Closed