[Qt-interest] click method for Qlabel
Yuvaraj R
yuvaraj at ongobiz.com
Mon Aug 31 09:38:40 CEST 2009
I am having problem with setting the icons for Pushbuttons..That why i am
moving for QLabel.
buttons don't have the scaled contents property. if i want to set one
circular icons for buttons..it is going to sit in middle..
Thanks
Yuvaraj R
On 8/31/09, Arnold Krille <arnold at arnoldarts.de> wrote:
>
> On Monday 31 August 2009 08:51:47 Yuvaraj R wrote:
> > Hi i want to emit the signals from Qlabel class,when label is clciked..
>
> A label that is clickable is a button. Please do your users a favour and
> use a
> button.
> Really if you start mixing labels that aren't clickable and label that are,
> you confuse your users. At first they won't find your buttons because they
> look
> like labels, then they will try to click on every label and complain if
> something doesn't react. And they will also complain at other authors for
> their apps. So, even if you can handle the bug-reports, I don't want to
> explain my users that they learned something wrong from your app.
>
> If you do not want the typical QPushButton, look at the alternatives
> inheriting from QAbstractButton. Or implement your own deriving from
> QAbstractButton.
>
> > But Keypressevent is not virtual in Qlabel class..So we can't override
> it.
>
> Why? QLabel inherits from QFrame which inherits from QWidget. And there
> keyPressEvent is virtual. If its virtual once, its virtual everywhere.
>
> Have fun,
>
> Arnold
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090831/3a4f391a/attachment.html
More information about the Qt-interest-old
mailing list