[PyKDE] Clickable links in QLabel

Phil Thompson phil at riverbankcomputing.co.uk
Wed Mar 7 08:34:35 GMT 2007


On Wednesday 07 March 2007 8:13 am, Tina I wrote:
> I'm trying to make a link in a QLabel that will open in the systems
> default browser. I can make the link but I can't make it clickable. When
> I try "setOpenExternalLinks(True)"  I get the following error:
>
> Traceback (most recent call last):
>   File "metlink.py", line 99, in ?
>     f = MetlinkMain()
>   File "metlink.py", line 19, in __init__
>     self.ui.setupUi(self)
>   File "/home/tina/py/metlink/metlinkGUI.py", line 140, in setupUi
>     self.label_9.setOpenExternalLinks(True)
> AttributeError: setOpenExternalLinks
>
> Is this not implemented in PyQt4? If so it would be great if someone
> would be kind enough to provide some pointers to how I can make a link
> clickable.
>
> I'm using the Debian Etch package of PyQt by the way.

Which version of Qt is that? setOpenExternalLinks() appeared in Qt v4.2.

Phil




More information about the PyQt mailing list