title: How to create a bold, red text label in Qt?
body: <p>I want to write a single, bold red line in my application using Qt.</p>
  
  <p>As far as I understand, I would create a QLabel, set its textFormat to rich text and give it a rich text string to display:</p>
  
  <pre><code>QLabel *warning = new QLabel;
  warning-&gt;setTextFormat(Qt::RichText);
  warning-&gt;setText("{\\rtf1\\ansi\\ansicpg1252 {\\fonttbl\\f0\\fswiss\\fcharset0 Helvetica;} {\\colortbl;\\red255\\green0\\blue0;} \\f0 \\cf0 this is bold red text}");
  </code></pre>
  
  <p>I tested this rich text string in a rich text editor and it displays fine.</p>
  
  <p>But Qt displays the whole string with all braces, keywords and backslashes instead of "this is bold red text". What am I doing wrong?</p>
  
  <p>Thank you for your help.</p>