import QtQuick 2.0
import QtWebKit 3.0
The code is work but when I try call
I received error like this:
Thanks for the any help!
Also I found another problem with QML Web View in QML 2 with Qt5. The problem is:
Cannot assign to non-existent property "settings"
The QML code of WebView component looks like:
Maybe in current version of Qt 5 WebView component have some bugs with provisions for methods and property or I forgot import some libs.
P.S. In my .pro file I added a modules:
QT += qml quick webkit webkitwidgets
I'd like to see how to do it too.
The API of the WebView type in QtWebKit 3.0 is completely different to the previous version.
See http://doc-snapshot.qt-project.org/5.0/qtwebkit/qtwebkit-index.html for information, and see http://doc-snapshot.qt-project.org/5.0/qtwebkitexamples/qtwebkitexamples-index.html for examples using the WebView type.
From what I can see, the new API is simpler, but possibly allows less introspection and binding capability, than the previous version. It could be that inspecting the DOM or calling JS functions directly on a WebView is not possible with the new API. You can, of course, use QWebElement and friends, but you might have to write some custom wrappers to expose its functionality to QML. I don't really know the WebKit code at all, so I can't really say for sure, to be honest.