[webkit-qt] QML integration question

Alexis Menard alexis.menard at openbossa.org
Thu Nov 3 01:20:20 PDT 2011


Hi,

On Thu, Nov 3, 2011 at 4:58 AM, Harri Pasanen <grego at mpaja.com> wrote:
> I'm making my first steps in QML, looking at QML Web View element.
>
> If I'd like to get access to functionality under the hood to extend what QML
> Web View does, how would I go about it?

You in fact can't.

>
> For instance, I'd like to intercept linkClicked signal that QWebView sends,
> but QML Web View does not expose.
>

One way could be to extend QDeclarativeWebView but it's a private
class (exported). QDeclarativeWebView is just a wrapper on top of
QGraphicsWebView not QWebView.

You can see if you prefer to subclass QGraphicsWebView and expose it in QML.

The WebView element in QtWebKit 1.0 was not developed further as we
move to WebKit2/Qt5 where in that world the QML api will be the
primary entry point.

> Is there a way to subclass in C++ what ever class QML uses underneath to
> implement a better QML Web View element?

See previous.

>
> I'd appreciate any pointers to either documentation or source code.
>
> Or should at ask at qt-qml mailing list?
>
> Thanks,
>
> Harri
>
>
> _______________________________________________
> webkit-qt mailing list
> webkit-qt at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-qt
>



-- 
Alexis Menard (darktears)
Software Engineer
INdT Recife Brazil


More information about the webkit-qt mailing list