Modify settings in WebKit 3.0



  • I’m trying to use WebView in WebKit 3.0 in my Qt Quick 2 project. This loads:

    @
    ApplicationWindow {
    visible: true
    width: 300
    height: 200

    WebView {
        url: "http://www.google.com"
        anchors.fill: parent
    }
    

    }
    @

    But the webpage is terribly small:

    !http://d.pr/i/r6yY+( )!

    I would expect the webpage to keep its size, with WebView providing scrollbars to allow scrolling, like normal browsers do. Is there any way I can change this behaviour? I don’t see anything useful in the "WebKit 3.0 documentation":http://qt-project.org/doc/qt-5/qml-qtwebkit-webview.html

    Edit: I’m using Qt 5.3 provided by Homebrew on OS X.



  • I feel it is behaving the right way. Logically programmer need to pass the size of the window in which we need to display the content. Otherwise it is taking default value as 160 to make it fit for mobility. It can be enhancement request to keep the size of the page.



  • The point is that there’s no way to let it set the scaling ratio other than the default one. QWebView, which is presumably based on the same thing, has a "zoomFactor":http://qt-project.org/doc/qt-5/qwebview.html#zoomFactor-prop property that we can use to change it. Nothing like that exists for WebView, at least not in the documentation.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.