On Thu, Nov 3, 2011 at 9:06 AM, Felipe Crochik <[email protected]> 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 <[email protected] > > wrote: > >> Hi, >> >> On Thu, Nov 3, 2011 at 4:58 AM, Harri Pasanen <[email protected]> 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 >> > [email protected] >> > http://lists.webkit.org/mailman/listinfo.cgi/webkit-qt >> > >> >> >> >> -- >> Alexis Menard (darktears) >> Software Engineer >> INdT Recife Brazil >> _______________________________________________ >> webkit-qt mailing list >> [email protected] >> http://lists.webkit.org/mailman/listinfo.cgi/webkit-qt >> > > > _______________________________________________ > webkit-qt mailing list > [email protected] > http://lists.webkit.org/mailman/listinfo.cgi/webkit-qt > >
_______________________________________________ webkit-qt mailing list [email protected] http://lists.webkit.org/mailman/listinfo.cgi/webkit-qt
