Scroll a QWebengineView
-
Which class manage scrolling in QWebengineview? I try so send a qwheelevent to the widget and nothing append, so i suppose that i'm not sending it to the right objet. I try to send to the QWebEngineView, to the page, to the view object in the page. Is it a wy to access to the scollbars?
Why scroll function doesn't works on this widget?
Thx
-
There is a feature request to implement this: https://bugreports.qt.io/browse/QTBUG-48323
For now, there is only a workaround which is to scroll using JavaScript:
QWebEngineView()->page()->runJavaScript(QString("window.scrollTo(%1, %2);").arg(scrollX).arg(scrollY));
-
Which class manage scrolling in QWebengineview? I try so send a qwheelevent to the widget and nothing append, so i suppose that i'm not sending it to the right objet. I try to send to the QWebEngineView, to the page, to the view object in the page. Is it a wy to access to the scollbars?
Why scroll function doesn't works on this widget?
Thx
@minnit_s said in Scroll a QWebengineView:
Which class manage scrolling in QWebengineview? I try so send a qwheelevent to the widget and nothing append, so i suppose that i'm not sending it to the right objet. I try to send to the QWebEngineView, to the page, to the view object in the page. Is it a wy to access to the scollbars?
Why scroll function doesn't works on this widget?
Thx
It is not working because first you have to find the right child for which to send the event - see below
HTH