[Qt-qml] Basic QML Webkit + Flickable not working

michael.brasser at nokia.com michael.brasser at nokia.com
Tue Nov 9 05:38:28 CET 2010


Hi,

On 06/11/2010, at 7:17 AM, 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?

Does it work correctly if you give the Flickable an id, and bind WebView's preferredWidth to myFlickable.width rather than parent.width? Items added in a Flickable become a child of the Flickable's contentItem rather than the Flickable itself, which may be causing the problem (parent.width is binding to the contentItem's width rather than the Flickable's width).

Regards,
Michael

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20101109/89b7e5ca/attachment.html 


More information about the Qt-qml mailing list