title: How to return QTextEdit RichText as plain text?
body: <p>I have a <code>QTextEdit</code> whose textFormat is <code>Qt::RichText</code> so it is possible to format the text with HTML tags. On this <code>QTextEdit</code> I have a <code>QPopupMenu</code> thats filled with <code>QActions</code>. One of these actions is a simple copy that connects into <code>SLOT( onClipboardCopy() )</code>.
  <code>QTextEdit</code>'s copy() is defined as &quot;Copies any selected text (from selection 0) to the clipboard.&quot;<br/>
  If there is something selected this function is perfect. However, I'd like to copy ALL of the TextEdit's content when nothing is selected.<br/>
  Here's the slot:</p>
  <pre><code>void WidgetName::onClipboardCopy()
  {
  
      if ( TextEdit-&gt;hasSelectedText() )
      {
          TextEdit-&gt;copy();
      }
      else
      {
          QClipboard * xClipboard = QApplication::clipboard();
          xClipboard-&gt;setText( TextEdit-&gt;text() );
      }
  }
  </code></pre>
  <p>The problem is in else TextEdit-&gt;text() returns the text with all of it's HTML tags. Is there an easy way to discard them?</p>