A QML document has a Flickable which contains a WebView. <pre> import Qt 4.7 import QtWebKit 1.0 Rectangle { width: 800 height: 480 Flickable { x: 25 y: 25 width: 750 height: 360 contentWidth: 750 contentHeight: help_browser.height clip: true WebView { id: help_browser url: "qrc:/doc/help.html" width: 750 } } .... } </pre> This results in the image shown in webview-bad.png. The chequered area should be filled with docs. However, as soon as I pan even a little bit the docs appear and I get webview-ok.png. The HTML file has this <head>: <pre> <html> <head> <title>....</title> <link href="doc/stylesheet.css" rel="stylesheet" type="text/css"> </head> </pre> As soon as I leave out the stylesheet line it works as it should and the page is immediately loaded. Perhaps this is really a WebKit problem, but as I only use it together with QML I have no idea. The stylesheet is loaded and applied if both the HTML and CSS files are loaded from resources.
Created attachment 72008 [details] webview-bad.png
Created attachment 72009 [details] webview-ok.png
Please report QtWebKit bugs using http://webkit.org/new-qtwebkit-bug See http://trac.webkit.org/wiki/QtWebKitBugs for guidance.
It will render It's content, if you set the preferredHeight and preferredWidth properties to a value grater than 0. The best is, to set these properties to the size of your flockable element.
Henrik, could you attach a .qml file so people can test this directly?
Created attachment 74913 [details] QML testcase showing a web page using CSS and one which does not Here's a test project. Seems to be broken in both cases on MacOS X
patch in https://bugs.webkit.org/show_bug.cgi?id=50222 should solve this issue.
*** This bug has been marked as a duplicate of bug 50222 ***