I have xhtml document like this: QString gHtmlDefHeader = QString::fromUtf8("<?xml version=\"1.0\" encoding=\"utf-8\"?>" "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">" "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"pl\">" "<head></head><body>"); QString gHtmlDefFooter = QString::fromUtf8("</body></html>"); I write it to QWebView with command: ui->mOutput->setHtml(gHtmlDefHeader + stylesForOutputList() + gHtmlDefFooter); And I read it with command: ui->mOutput->page()->mainFrame()->toHtml() And suprisingly result does not have: "<?xml version=\"1.0\" encoding=\"utf-8\"?>" So my direct page dumps are broken due to lack info about encoding!!!
This is not a QWebView bug. *** This bug has been marked as a duplicate of bug 25206 ***