Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
5.7.1
-
None
-
Debian GNU/Linux sid amd64
Description
I was not able to get custom wheel events working with QWebEngineView. In particular:
- If I intercept the event in an overridden method, and call ignore(), the page is still scrolled;
- It is impossible to send custom wheel events, they just get ignored.
The test case for the first issue:
#include <QtCore/QDebug> #include <QtCore/QUrl> #include <QtGui/QWheelEvent> #include <QtWidgets/QApplication> #include <QtWebEngineWidgets/QWebEngineView> class MyWebView: public QWebEngineView { public: void wheelEvent(QWheelEvent *event) override { qDebug() << "Intercepted event" << event; event->ignore(); } }; int main(int argc, char **argv) { QApplication app(argc, argv); MyWebView view; view.load(QUrl("https://www.qt.io/")); view.show(); return app.exec(); }
Expected result is that scrolling is blocked and does not work. However it does work.
The debug messages are printed, so the override works.
Attachments
Issue Links
- duplicates
-
QTBUG-43602 Mouse events are not handled in WebEngineView
-
- Closed
-