The warnings and errors that I am getting:
Using Qt Quick 1 code model instead of Qt Quick 2 (M324);
Invalid property name 'onNavigationRequested';
Tried the following example from this qt project webpage:
https://qt-project.org/doc/qt-5-snap...t-webview.html
import QtQuick 2.0
import QtQuick.Controls 1.0
import QtWebKit 3.0
ScrollView {
width: 1280
height: 720
WebView {
id: webview
url: "http://qt-project.org"
anchors.fill: parent
onNavigationRequested: {
// detect URL scheme prefix, most likely an external link
var schemaRE = /^\w+:/;
if (schemaRE.test(request.url)) {
request.action = WebView.AcceptRequest;
} else {
request.action = WebView.IgnoreRequest;
// delegate request.url here
}
}
}
}
import QtQuick 2.0
import QtQuick.Controls 1.0
import QtWebKit 3.0
ScrollView {
width: 1280
height: 720
WebView {
id: webview
url: "http://qt-project.org"
anchors.fill: parent
onNavigationRequested: {
// detect URL scheme prefix, most likely an external link
var schemaRE = /^\w+:/;
if (schemaRE.test(request.url)) {
request.action = WebView.AcceptRequest;
} else {
request.action = WebView.IgnoreRequest;
// delegate request.url here
}
}
}
}
To copy to clipboard, switch view to plain text mode
I am getting the warnings/errors as stated in the title.
First warning shows when I hover on WebView and the second error appears when I hover on onNavigationRequested.
Qt version I am using is 5.3.1
Qt Quick Component set I selected through QtCreator is: Qt Quick 2.2
QtCreator version is: 3.1.2
on Ubuntu 14.04.1 LTS
Tell me if there is something else that I can present here for you to help me.
Bookmarks