Hi, i'm trying to render a html file, is a report from a query, with this code:

Qt Code:
  1. void SalesForm::renderProposal()
  2. {
  3. QString fileName = QDir::currentPath() + "/templates/proposal_template.html";
  4. QFile file(fileName);
  5. if (!file.open(QIODevice::ReadOnly)) {
  6. QMessageBox::warning(this, trUtf8("Error Abriendo Plantilla"),
  7. trUtf8("No se puedo abrir '%1'").arg(fileName));
  8. }
  9.  
  10. QTextStream stream(&file);
  11. QString htmlString;
  12. htmlString = stream.readAll();
  13. QString textEditString = htmlString.arg(propsData.at(0).at(0)).arg(propsData.at(3).at(0)).arg(propsData.at(16).at(0));
  14. propOutTextEdit->setHtml(textEditString);
  15. }
  16. }
To copy to clipboard, switch view to plain text mode 

The file loads fine, but the QTextEdit don't render very well the html file, I took a screenshot where the file is loaded
on Google Chrome and QTextEdit twice.

htmlQTextEdit.jpg

html code is shown here:
http://pastebin.ca/2170961

I'm not trying to compare Google Chrome with QTextEdit, but the html file is very simple and is made with kompozer.

Thanks.