title: Apply a custom stylesheet to QTextDocument
body: <p>I want to apply some custom stylesheet to a QTextDocument using <code>setDefaultStyleSheet</code> function, however it get ignored.<br>
  According to <a href="https://stackoverflow.com/questions/15730224/qt-ignores-css-in-qtextdocument">this</a> post i should add the style sheet <em>after</em> setting the html content, but this did not solve my problem.<br>
  My code:</p>
  
  <pre><code>QString *html = new QString();
  *html = "&lt;tr&gt;" + name + "&lt;/tr&gt;"
          "&lt;tr&gt;" + surname + "&lt;/tr&gt;"
          "&lt;tr&gt;" + age + "&lt;/tr&gt;&lt;/table&gt;";
  QTextDocument doc;
  doc.setHtml(*html);
  doc.setDefaultStyleSheet("table { border: 1px solid black; }"); // This should apply the style sheet
  </code></pre>