Is there a way to remove scrollbars from QWebEngineView
or can i somehow get access to it's ScrollArea?
With webkit it was as easy as
WebView->page()->setScrollBarPolicy(Qt::Vertical, Qt::ScrollBarAlwaysOff);
WebView->page()->setScrollBarPolicy(Qt::Horizontal, Qt::ScrollBarAlwaysOff);
but i don't see any similar functionality within QWebEngine. I do not even see any scroll area within qwebengine sources.. Is there a something that i'm missing?
Update: I think i can try to force scrollbars disappear from some css settings that are passed with page for chromium
Just set QWebEngineSettings::ShowScrollBars
to false which is introduced in Qt 5.10
See QWebEngineSettings::WebAttribute
Changing css style of the webpage worked. I've used
<style type="text/css">
body {
overflow:hidden;
}
</style>
but bad luck for those, who do not have access for css of the webpage you are trying to show the way you want.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With