Search code examples
zoomingqt5qwebview

QWebview/webkit disable zoom double click


I would like to help with QWebView. I'm trying to create a software that will open a web page, so far everything was right, but I came across an issue with QWebView. On double click with the mouse is zooming.

WebView {
    id: webviewHelp
    anchors.fill: parent
    smooth: false
    url: "http://stackoverflow.com"
    objectName: "webView"
}

Solution

  • This happens because of the use of mobile devices that need disabled some features that bring comfort to small devices. Put on head this code

    <head>
        <meta name="viewport" content="width=device-width; initial-scale=1; 
              maximum-scale=1; user-scalable=no;target-densitydpi=72;" />
    
        ...
    </head>