title: Generate HTML using Qt
body: <p>I try to programmatically generate HTML using Qt 5.7 and C++. </p>
  
  <p>I would like to avoid using simple text streaming since this does not check HTML syntax.</p>
  
  <p>I tried to use <code>QTextDocument</code> and <code>toHtml()</code> but it seems not to work very well. It generally supports a small HTML subset only and a lot of standard elements must still be coded into strings manually.</p>
  
  <p>Is there a clean way to generate HTML code using Qt/C++? Maybe some class that does for HTML what <code>QDomDocument</code> does for XML?</p>