在Qt-creator中找不到QWebView该如何做?
如题,谢谢大家!
下载 Qt5.5.1 注意不要比这个版本高
代码:
import QtQuick 2.0
import QtQuick.Controls 1.0
import QtWebKit 3.0
import QtQuick.Layouts 1.1
Rectangle {
width: 1024
height: 720
ColumnLayout{
spacing:2
anchors.fill: parent
RowLayout{
spacing: 2
TextInput{id: url;Layout.fillWidth: true;text: "http://www.baidu.com/"}
Button{id: go;text: "Go";onClicked: webHtml.url=url.text}
Keys.onReturnPressed: {go.clicked()}
}
ScrollView {
Layout.fillWidth: true
Layout.fillHeight: true
WebView {
id: webHtml
anchors.fill: parent
}
}
}
}