[PyKDE] Clickable links in QLabel

Tina I tinaweb at bestemselv.com
Wed Mar 7 09:21:45 GMT 2007


Phil Thompson wrote:
> 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
Hi Phil,

I seem to have Qt v4.2.1 (reported by QtDesigner "About Qt") and PyQt 
v4.0.1 (http://packages.qa.debian.org/p/python-qt4.html) so I guess it's 
Debian that's lagging behind...

Thanks
Tina
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20070307/1bf743d4/attachment.html


More information about the PyQt mailing list