[webkit-qt] QML integration question

Jesus Sanchez-Palencia jesus at webkit.org
Thu Nov 3 05:42:00 PDT 2011


On Thu, Nov 3, 2011 at 9:06 AM, Felipe Crochik <felipe at crochik.com> wrote:

> I have created a new webview qml element from scratch but on one of my
> many (failed) attempts to find out why my application crashes on harmattan
> I also tried copying the qdeclarativewebview.cpp and
> qdeclarativewebview_p.h from the Qt sources and making a few modifications.
>


Just out of curiosity, Felipe, what motivated you to write your own QML
WebView? Do you have any specific use-case that isn't covered by the
current API?


Cheers
jesus



>
> It was surprisingly uneventful and it worked just fine (I just registered
> on my c++ code the type and could swap between "implementations" by just
> changing the import statement on my qml).
>
> Most likely you will have to modify the "private" parts of the
> implementation so you won't be able to "just" extend the class and with
> future qt releases you will have to manually merge your changes.
>
> Felipe
>
>
> On Thu, Nov 3, 2011 at 4:20 AM, Alexis Menard <alexis.menard at openbossa.org
> > wrote:
>
>> 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
>> _______________________________________________
>> webkit-qt mailing list
>> webkit-qt at lists.webkit.org
>> http://lists.webkit.org/mailman/listinfo.cgi/webkit-qt
>>
>
>
> _______________________________________________
> webkit-qt mailing list
> webkit-qt at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-qt
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-qt/attachments/20111103/682673a3/attachment.html>


More information about the webkit-qt mailing list