How to display a file in the textBrowser. The file name is available on the line edit selected through the filedialog via Windowsbrowser. I need to be able to display various text files as available in Windows that is .txt .doc .pdf etc


I have tried

Qt Code:
  1. QUrl url("file://c:/ver.txt" );
  2. ui.textBrowser->clear();
  3. ui.textBrowser->setHtml(ui.datalineEdit->text());
  4. ui.textBrowser->show();
To copy to clipboard, switch view to plain text mode 
I tried other combinations but it did not work.This address of the url is perhaps the problem . In case of QT 3.3.4 on Unix it worked absolutely fine.

Any suggestions please.