我的操作系统是win10,QT版本为Qt5.7 mingw53_32,目标操作系统也是win10。当我使用qmlscene
运行qml文件时,出现了错误:
qrc:/[...].qml:3 模块“QtWebView”未安装
这是我的qml文件:
import QtQuick 2.0
import QtQuick.Controls 1.0
import QtWebView 1.1
ScrollView {
width: 1280
height: 720
WebView {
id: webview
url: "http://www.baidu.com"
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
}
}
}
}