title: QTextBrowser Hyperlinks in PyQt4
body: <p>I have a QTextBrowser where I've entered that sample text:</p>
  
  <pre><code>Column1    Column2
  1 2 3 4    www.google.com
  </code></pre>
  
  <p>Between the columns there are tabs and between the numbers there are spaces. plainText=QTextBrowser.toPlainText() gives:</p>
  
  <pre><code>Column1    Column2
  1 2 3 4    www.google.com
  </code></pre>
  
  <p>Now, i want to make the link clickable. By this, I'll set the text as html.
  I wrote some string operations with </p>
  
  <pre><code>WORDS = re.split("(\W+)",plainText) 
  </code></pre>
  
  <p>That gives</p>
  
  <pre><code>['Column1', '\t', 'Column2', '\n', '1', ' ', '2', ' ', '3', ' ', '4', '\t', 'www', '.', 'google', '.', 'com', ' ', '']
  </code></pre>
  
  <p>and replaced "www" with the hyperlink in html-format</p>
  
  <pre><code>&lt;a href=http://www.google.com&gt;www.google.com&lt;/a&gt;
  </code></pre>
  
  <p>Then, I deleted the items in WORDS: ".", "test", ".", "com".</p>
  
  <pre><code>['Column1', '\t', 'Column2', '\n', '1', ' ', '2', ' ', '3', ' ', '4', '\t', '&lt;a href=http://www.google.com&gt;www.google.com&lt;/a&gt;', ' ', '']
  </code></pre>
  
  <p>Then I rebuild all the WORDS-parts again to a string, replacing the linebreak \n with </p>
  
  <pre><code>&lt;br/&gt;.
  </code></pre>
  
  <p>Now, when I set the string to the QTextBrowser, the link is displayed correctly and also clickable. Problem is: The entered text, as it is now html, ignores/removes all spaces (if more than one) and tabs! 
  The output looks like (with the link now being blue and underlined)</p>
  
  <pre><code>Column1 Column2
  1 2 3 4 www.google.com 
  </code></pre>
  
  <p>How can I just make a hyperlink without the formatting being destroyed?</p>
  
  <p>Perhaps I am on the wrong train?? </p>