[Qt-interest] QPushButton: change font colour via style sheet ?
Alexandre Beraud
aberaud at infflux.com
Fri Feb 19 17:10:01 CET 2010
Hi,
The problem is that, as far as I know, when you apply a stylesheet to a
button, even if it is supposed to change the font color only, it will
change the whole aspect of the button, background and shape too.
Regards,
Alex
Darryl Campbell a écrit :
> Hi Stephen,
> Check here:
> http://doc.trolltech.com/4.6/stylesheet-examples.html#customizing-qpushbutton
>
> -Darryl
>
> On Fri, Feb 19, 2010 at 11:02 AM, Stephen Collyer
> <scollyer at netspinner.co.uk <mailto:scollyer at netspinner.co.uk>> wrote:
>
>
>
> On 19 February 2010 15:55, Andre Somers <andre at familiesomers.nl
> <mailto:andre at familiesomers.nl>> wrote:
>
> Stephen Collyer wrote:
> > I have a QPushButton displaying a QString
> >
> > QString number = ...
> > QPushButton* play_button = new QPushButton(number);
> >
> > I want to change the colour of the font used to display the
> number
> > string by
> > setting the style sheet for the QPushButton.
> >
> > Is this possible ?
> Yes, it is.
>
> André
>
>
> Touché. :-)
>
> And for extra bonus points: any chance of an example ?
>
> --
> Stephen Collyer
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com <mailto:Qt-interest at trolltech.com>
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
--
Alexandre BERAUD
Ingénieur Développement
Infflux - Informatique & Flux
Tel: 01 49 57 92 00 - Fax : 01 49 57 92 01
Mail: aberaud at infflux.com
Visitez notre site : www.infflux.com
More information about the Qt-interest-old
mailing list