Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

QML WebView Element does not render XHTML properly (Known Issue)

From Wiki
Jump to: navigation, search

The QML WebView Element does not render XHTML properly.

Article Metadata
Dependencies: QtWebKit 1.0
Created: Devnull (08 Dec 2011)
Last edited: hamishwillee (12 Aug 2012)


There is no property to switch between HTML and XHTML pages in Webview. The page loaded and saving via HTML tag does save its content. The rendering of the page is affected.

The following page is in XHTML and rendered as a black page, no text:

import QtWebKit 1.0
{ id: web url: ""
//url: "" // shown correctly
anchors.centerIn: parent width: 200 height: 200
settings.javascriptEnabled : false
scale: 0.5
smooth: false }

Page identify itself:

<html xmlns="" xmlns:fb="" xmlns:og=""><head>


The issue is reported as the following bug: QTBUG-23023

This page was last modified on 12 August 2012, at 23:17.
31 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.