PDA

View Full Version : PyQt 4 - launch file link from QTextBrowser



gtxy20
13th May 2009, 02:21
Hello,

I am just getting familiar with PyQt and am wondering what would be the proper way to place a link to a CSV or text file within the QTextBrowser widget that when clicked will open the file in either Open Office or MS Excel.

Currently I can place a file link for either a text file or an html file but as soon as this is clicked it is only displayed in the QTextBrowser widget.


QTextBrowser.append('<a href="testout.txt">Project</a>')

Any comments or direction is very appreciated.

Celeste

gtxy20
13th May 2009, 03:18
I was able to accomplish this with:


QTextBrowser.setOpenExternalLinks(True)