Hi,

to use code in your post use "[" instead of "<". Second setHtml() does not append, it overwrite the whole html content, so better use:
Qt Code:
  1. if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
  2. {
  3. qWarning("file not found");
  4. return;
  5. }
  6. browser->setHtml(file.readAll());
To copy to clipboard, switch view to plain text mode 
Third, we also have a Newbie section at this board. Just in case...