[Qt-qml] Basic QML Webkit + Flickable not working
Andrew.Christian at nokia.com
Andrew.Christian at nokia.com
Sat Nov 6 15:41:58 CET 2010
I ran into the same problem. Oddly, I found that it can be solved with:
import Qt 4.7
import QtWebKit 2.0
Flickable{
width: 240; height:400
function updateContentSize(w,h) {
contentWidth = Math.max(width,w);
contentHeight = Math.max(height,h);
}
WebView {
id: webView
preferredWidth: parent.width
preferredHeight: parent.height
url: 'http://qt.nokia.com'
onWidthChanged: updateContentSize(width,height)
onHeightChanged: updateContentSize(width,height)
}
}
I don't understand why. Some kind of race condition in the signals, perhaps?
- Andrew
On Nov 5, 2010, at 5:17 PM, ext Tico Ballagas wrote:
I was trying to create a basic QML Webkit + Flickable proof of concept.
import Qt 4.7
import QtWebKit 2.0
Flickable{
width: 640; height: 480
contentWidth: webView.width
contentHeight: webView.height
WebView {
id: webView
preferredWidth: parent.width
url: 'http://qt.nokia.com'
}
}
However, this seems to show a checkerboard... until you scroll. Once you scroll, the content magically appears. I've tried this on both Linux and Mac and get the same result. What am I doing wrong?
Best
-Tico
<ATT00001..txt>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20101106/14fb59ba/attachment.html
More information about the Qt-qml
mailing list