-
Type:
Bug
-
Status: Closed
-
Priority:
Not Evaluated
-
Resolution: Duplicate
-
Affects Version/s: 5.7.1
-
Fix Version/s: None
-
Component/s: WebEngine
-
Labels:None
-
Environment:Debian GNU/Linux sid amd64
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.
- duplicates
-
QTBUG-43602 Mouse events are not handled in WebEngineView
-
- Open
-