[Qt-interest] QPalette on PushButton

chandrasekar wagmare sekarwagmare at gmail.com
Sat Jan 31 08:56:45 CET 2009


On Sat, Jan 31, 2009 at 1:17 PM, Zeljko <zeljko at holobit.net> wrote:

> chandrasekar wagmare wrote:
>
> > hi friends,
> > i try to display different color with respect to the input ..
> >
> > so to set the color value i use three variable rd , gr , bl and i use it
> > as QColor(rd,gr,bl)
> >
> > using i program as
> >                 QPalette p;
> >                 p.setColor(QPalette::Background,QColor(rd,gr,bl));
> >                 Button->setPalette(p);
> >                 1Button->setPalette(p);
> >                 2Button->setPalette(p);
> >                 cButton->setPalette(p);
> >                 1Label->setPalette(p);
> >                 2Label->setPalette(p);
> >                 3Label->setPalette(p);
> >                 4Label->setPalette(p);
> >
> > here all the labels are displaying the color but
> > pushButtons are not displaying the background colors ... why?
>
> You must use QPalette::Button & QPalette::ButtonText for QPushButton
> colors.
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>


thanks and i get it ...
-- 
CHANDRU
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090131/f46ddfc1/attachment.html 


More information about the Qt-interest-old mailing list