Busata
Busata

Reputation: 1039

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"
}

Upvotes: 1

Views: 1241

Answers (2)

Jones
Jones

Reputation: 1500

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>

Upvotes: 2

Paul
Paul

Reputation: 23

Is that your full code? If not then check for a onDoubleClick property, I'm not familiar with Qt5 much but on Qt4 it had to be a child of a Flickable then the onDoubleClick property a child of the WebView calling heuristicZoom.

Upvotes: 0

Related Questions