[webkit-qt] Qt5 / WebKit2 / QML Examples & Documentation?

Milian Wolff milian.wolff at kdab.com
Fri Jun 1 10:10:43 PDT 2012


On Friday 01 June 2012 13:13:57 Kenneth Rohde Christiansen wrote:
> Hi there,
> 
> Not much have been done on the API documentation side. I did a bit,
> but not much.
> 
> We do thought have plenty of autotests mostly found in
> Source/WebKit2/UIProcess/API/qt/tests/qmltests/WebView/
> 
> Those show more or less how to use the API, as well as the MiniBrowser
> in Tools/MiniBrowser/qt

OK, thanks.

I hope its OK to post some more questions that I cannot figure out by looking 
at the examples here.

First up, I wanted to start with a minimal case, like e.g.:

~~~~~
import QtQuick 2.0
import QtWebKit 3.0

Rectangle {
    id: root
    width:800
    height:600

    WebView {
        id: webView
        clip: false
        anchors {
            top: parent.top
            left: parent.left
            right: parent.right
            bottom: parent.bottom
        }
    }

    Component.onCompleted: {
      console.log("completed")
      webView.url = "http://qt.nokia.com/"
    }
}
~~~~~

I notice that, while WebView is already a Flickable, it does not react on 
mouse drag'n'drop events. I.e. I cannot flick it. Neither does the view react 
on clicks, i.e. I cannot navigate the initially loaded website...

Looking at the MiniBrowser (i.e. BrowserWindow.qml) I cannot figure out how 
this is handled there. The ScrollIndicator is just eyecandy but is something 
like the itemSelector required to give the user feedback on where he clicked?

Bye

> On Fri, Jun 1, 2012 at 1:11 PM, Milian Wolff <milian.wolff at kdab.com> wrote:
> > Hey all,
> > 
> > are there any examples available on how Qt5's new QML/WebKit2 API is
> > supposed to be used? If so, where can I find those?
> > 
> > And the same question arises for API documentation. On the online
> > documentation page [1] I only find a mention of a "Featured Articles:
> > QtWebKit Developer Guide", but that one is not a link... Same goes for
> > the QtWebKit Module [2]...
> > 
> > Is the source code the only viable resource for now?
> > 
> > Cheers
> > 
> > [1]: http://doc-snapshot.qt-project.org/5.0/index.html
> > [2]:
> > http://doc-snapshot.qt-project.org/5.0/gettingstarted-develop.html#qt-
> > webkit
> > --
> > Milian Wolff | milian.wolff at kdab.com | Software Engineer
> > KDAB (Deutschland) GmbH&Co KG, a KDAB Group company
> > Tel. Germany +49-30-521325470, Sweden (HQ) +46-563-540090
> > KDAB - Qt Experts - Platform-independent software solutions
> > 
> > _______________________________________________
> > webkit-qt mailing list
> > webkit-qt at lists.webkit.org
> > http://lists.webkit.org/mailman/listinfo.cgi/webkit-qt
-- 
Milian Wolff | milian.wolff at kdab.com | Software Engineer
KDAB (Deutschland) GmbH&Co KG, a KDAB Group company
Tel. Germany +49-30-521325470, Sweden (HQ) +46-563-540090
KDAB - Qt Experts - Platform-independent software solutions
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.webkit.org/pipermail/webkit-qt/attachments/20120601/77c9b991/attachment.bin>


More information about the webkit-qt mailing list