Remove ScrollBars from QWebEngineView or QWebEnginePage

前端 未结 2 1192
眼角桃花
眼角桃花 2020-12-17 19:07

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



        
相关标签:
2条回答
  • 2020-12-17 19:43

    Just set QWebEngineSettings::ShowScrollBars to false which is introduced in Qt 5.10

    See QWebEngineSettings::WebAttribute

    0 讨论(0)
  • 2020-12-17 19:47

    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.

    0 讨论(0)
提交回复
热议问题