【发布时间】:2014-08-26 21:23:29
【问题描述】:
我试图在我的 qml 代码中使用 webview,但滚动不适用于这两个版本的 QtQuick 和 QtWebKit。 我也试过Flickable Web View,滚动效果很好,但fixed position content is not properly repositionned。
我必须做些什么来解决这些问题?
P.S:当我使用 QtQuick 2.0 和 QtWebKit 3.0 时,没有问题,并且对于材料限制,我必须同时使用 1.0 版本。我使用的是 QT 5.3 版。
这是我的 qml 课程:
import QtQuick 1.0
import QtWebKit 1.0
Rectangle {
id: container
width: 700
height: 300
property string initialUrl: "http://bootstrap2modaldemo.scripting.com/"
Rectangle {
id: thumbnailContainer
color: "black"
anchors.bottom: container.bottom
width: container.width
}
Rectangle {
id: content
width: container.width
color: "black"
anchors {
top: container.top
bottom: thumbnailContainer.top
}
WebView {
id: webView
anchors.fill: parent
width: container.width
opacity: 1
url: container.initialUrl
}
}
}
【问题讨论】:
标签: qt webview qml qtwebkit flickable