RESOLVED DUPLICATE of bug 50222 48413
[Qt] QML WebView doesn't render content
https://bugs.webkit.org/show_bug.cgi?id=48413
Summary [Qt] QML WebView doesn't render content
Henrik Hartz
Reported 2010-10-27 04:45:54 PDT
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.
Attachments
webview-bad.png (38.56 KB, image/png)
2010-10-27 04:46 PDT, Henrik Hartz
no flags
webview-ok.png (66.27 KB, image/png)
2010-10-27 04:48 PDT, Henrik Hartz
no flags
QML testcase showing a web page using CSS and one which does not (2.04 KB, application/zip)
2010-11-26 03:49 PST, Henrik Hartz
no flags
Henrik Hartz
Comment 1 2010-10-27 04:46:35 PDT
Created attachment 72008 [details] webview-bad.png
Henrik Hartz
Comment 2 2010-10-27 04:48:14 PDT
Created attachment 72009 [details] webview-ok.png
Simon Hausmann
Comment 3 2010-11-02 07:32:57 PDT
Please report QtWebKit bugs using http://webkit.org/new-qtwebkit-bug See http://trac.webkit.org/wiki/QtWebKitBugs for guidance.
Frank Wolbring
Comment 4 2010-11-04 09:33:22 PDT
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.
Benjamin Poulain
Comment 5 2010-11-12 07:28:55 PST
Henrik, could you attach a .qml file so people can test this directly?
Henrik Hartz
Comment 6 2010-11-26 03:49:49 PST
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
Gopal Raghavan
Comment 7 2011-01-20 13:20:10 PST
patch in https://bugs.webkit.org/show_bug.cgi?id=50222 should solve this issue.
Alexis Menard (darktears)
Comment 8 2011-02-24 08:53:35 PST
*** This bug has been marked as a duplicate of bug 50222 ***
Note You need to log in before you can comment on or make changes to this bug.