Results 1 to 2 of 2

Thread: PyQt 4 - launch file link from QTextBrowser

  1. #1
    Join Date
    May 2009
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default PyQt 4 - launch file link from QTextBrowser

    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.

    Qt Code:
    1. QTextBrowser.append('<a href="testout.txt">Project</a>')
    To copy to clipboard, switch view to plain text mode 

    Any comments or direction is very appreciated.

    Celeste

  2. #2
    Join Date
    May 2009
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: PyQt 4 - launch file link from QTextBrowser

    I was able to accomplish this with:

    Qt Code:
    1. QTextBrowser.setOpenExternalLinks(True)
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. How to link to a DLL in PRO file
    By richardander in forum Qt Programming
    Replies: 1
    Last Post: 23rd December 2008, 12:30
  2. link from QTextBrowser to QWebView
    By lamera in forum Qt Programming
    Replies: 4
    Last Post: 12th October 2008, 15:46
  3. How to detect link added in QTextBrowser?
    By live_07 in forum Qt Programming
    Replies: 1
    Last Post: 8th July 2008, 05:40
  4. Replies: 4
    Last Post: 24th November 2007, 13:33
  5. QTextBrowser - click on link - closes window
    By bruccutler in forum Newbie
    Replies: 2
    Last Post: 19th June 2007, 20:39

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.