[PyKDE] Clickable links in QLabel
Phil Thompson
phil at riverbankcomputing.co.uk
Wed Mar 7 10:05:21 GMT 2007
On Wednesday 07 March 2007 9:21 am, Tina I wrote:
> 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...
You need a later PyQt.
Phil
More information about the PyQt
mailing list