[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [PyKDE] Active links in a QLabel
From:       "Roberto Alsina" <ralsina () kde ! org>
Date:       2004-08-17 17:15:28
Message-ID: 64131.200.80.37.50.1092762928.squirrel () linux ! netline ! com ! ar
[Download RAW message or body]


> On Tuesday 17 August 2004 09:12, Detlev Offenbach wrote:
>
>> I would like to display active links (like the one to the eric3
>> homepage)
>> in the about message box. I was able to get them show as links. However,
>> clicking on them didn't do anything.
>
> Neither QLabel (nor its base classes QFrame/QWidget) emit any signals, so
> you'd have to subclass it and overload one or more of the mouse*Event and
> keyPressEvent methods to capture the clicks/key presses, and then either
> directly or via a signal launch a browser and pass it the URL.
>
> Alternatively, you'd could derive something from QButton (abstract), which
> emits the necessary signals, but then you have to provide the paint code.
>
> I'm didn't find a "link" type widget in Qt (although that doesn't mean
> there
> isn't one - I'm kind of surprised there isn't any).

Absolute overkill: use a QTextBrowser or similar classes. Should be pretty
simple, even if it wastes a MB of RAM or two.

-- 
 ("\''/").__..-''"`-. .         Roberto Alsina
 `9_ 9  )   `-. (    ).`-._.`)  ralsina@kde.org
 (_Y_.)' ._   ) `._`.  " -.-'   KDE Developer (MFCH)
  _..`-'_..-_/ /-'_.'
(l)-'' ((i).' ((!.'             Buenos Aires - Argentina
Imminentizing the eschaton since 1971.

_______________________________________________
PyKDE mailing list    PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic