[Qt-interest] Need to show a dialog on click of QLabel

Arnold Krille arnold at arnoldarts.de
Thu May 14 17:23:08 CEST 2009


On Thursday 14 May 2009 16:33:09 Srdjan Todorovic wrote:
> 2009/5/14 Scott Aron Bloom <Scott.Bloom at sabgroup.com>:
> >> Use a button instead of a label. Something clickable is a button,
> > something
> >> just for display of text and/or graphic is a label. For the sake of
> >> userfriendlieness keep it that way. Otherwise you can't expect your
> > users to
> >> know that they should click the label. Unless you want them to click
> > on all
> >> labels and complain that for most of them nothing happens...
> > +1... Unless you are re-implementing all the styles of the label
> > necessary to give you the proper look and feel.. labels should not be
> > clickable
> In that case, what's this for?
> http://doc.trolltech.com/4.5/qlabel.html#linkActivated
>   (as a side note: how does one use the above? There's no setLink() or
> anything else on QLabel that seems relevant...)

Try setting the label text to "<qt><b>something bold</b><a 
href="http://www.arnoldarts.de">a link</a></qt>" and see what happens.

> Unless that is classed as having functionality for proper look and feel.
> Hyperlinks? These are labels that are clickable...

There is a difference between a whole label that is clickable (and should be 
replaced by a proper button) and a link inside a labels text (which will 
automaticly be marked as a link and the mouse-cursor will change too).

Arnold
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090514/b219cc48/attachment.bin 


More information about the Qt-interest-old mailing list