Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.12.3
-
None
-
Windows 8.1
-
-
1a14f7e91b065ed287a4982d4bea0027121926f4 (qt/qtbase/5.12)
Description
1. Take the `corelib/threads/Mandelbrot` example (I want it only for mouse wheel usage)
2. Replace main with the following (`winId` call here is important to make widget native):
#include "mandelbrotwidget.h" #include <QApplication> #include <QTableView> #include <QHBoxLayout>//! [0] int main(int argc, char *argv[]) { QApplication app(argc, argv); QWidget widget; auto mwidget = new MandelbrotWidget (); mwidget->setSizePolicy (QSizePolicy::Expanding, QSizePolicy::Expanding); auto mtable = new QTableView (); mtable->setMaximumWidth (100); auto layout = new QHBoxLayout (&widget); layout->addWidget (mtable); layout->addWidget (mwidget); widget.show(); mwidget->winId (); widget.resize (500, 500); return app.exec(); } //! [0]
3. Scrolling doesn't work on 100 left pixels of Mandelbrot widget.
or just extract the attachment which contains the same thing.
Seems to be caused by
https://codereview.qt-project.org/#/c/252059/7/src/plugins/platforms/windows/qwindowspointerhandler.cpp
In the following code `localPos` is found relative to `receiver` yet `handleWheeEvent` is sent to `window` which may be different, causing inconsistency:
QPoint localPos = QWindowsGeometryHint::mapFromGlobal(receiver, globalPos); QWindowSystemInterface::handleWheelEvent(window, localPos, globalPos, QPoint(), angleDelta, keyM odifiers);
Attachments
Issue Links
- is duplicated by
-
QTBUG-71392 QWheelEvent returns incorrect mouse position
- Closed