← Back to team overview

ubuntu-phone team mailing list archive

WebView Flickable?

 

Hi,

Maybe I haven't been able to find the right documentation, but is
there an example on how to place a WebView inside a Flickable? I would
prefer not to have scrollbars on the webview itself, and be able to
click+drag to scroll (on desktop, haven't tested on device).

I'm trying to keep it as simple as possible, so far I have (not working):


import QtQuick 2.0
import Ubuntu.Components 1.1
import Ubuntu.Web 0.2


MainView {
    height: units.gu(75)
    width: units.gu(100)

    Flickable {
        id: webViewFlickable
        anchors.fill: parent

        WebView {
            id: webView
            anchors.fill: parent
            url: 'http://www.ubuntu.com/'
        }

    }

    Scrollbar {
        flickableItem: webViewFlickable
        align: Qt.AlignTrailing
    }

}



Regards,

Matt


Follow ups