Qt-interest Archive, March 2007
changing button color in plastioque style
Message 1 in thread
hi,
well i tryed to color my buttons in plastique style so they look more
colorfull. tho i know have some nice colored QPushbuttons it happends
that they look very flat due to the fact that they are filled with just
one single color.
in the qt designer in the preview with plastique style buttons have a
color gradient. i seem not to be able to find the pallette entry to get
a color gradient working...
does anyone know how to do that :) ?
best regards
--
[ signature omitted ]
Message 2 in thread
qApp->setPalette( qApp->style()->standardPalette() );
--
[ signature omitted ]
Message 3 in thread
Hi,
Is there a possibility using stylesheet to control combox items color?
(text color or background item color)?
if someone can give me the best way to do this?...
Thank you for any idea.
Veronique.
--
[ signature omitted ]
Message 4 in thread
Hello,
I do not know if it is the best way but i should use the model/view
facilities. You define your model inheriting from QAbstractListModel and by
reimplementing QAbstractListModel::data() method, you can return the role
you need to manage item background and text color ( Qt::BackgroundRole and
Qt::TextColorRole ). Then you attach your model to the combo box thanks to
setModel() method.
Regards,
Eric.
>From: veronique.lefrere@xxxxxx
>To: qt-interest@xxxxxxxxxxxxx
>Subject: changing combobox items color? (Qt422)
>Date: Tue, 27 Mar 2007 10:03:04 +0200
>
>Hi,
>
>Is there a possibility using stylesheet to control combox items color?
>(text color or background item color)?
>
>if someone can give me the best way to do this?...
>
>Thank you for any idea.
>
>Veronique.
>
>--
>To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
>"unsubscribe" in the subject or the body.
>List archive and information: http://lists.trolltech.com/qt-interest/
>
_________________________________________________________________
Gagnez des pc Windows Vista avec Live.com http://www.image-addict.fr/
--
[ signature omitted ]
Message 5 in thread
well this sets the standard platette. what i need is a something like a
gray QPushButton in plastique style with a color gradient like seen in
the standard palette for the plastique style.
pal.setBrush(QPalette::Button, QColor(92, 92, 92));
makes the button gray but where can i set the color gradient for it?
regards
johannes
SABROG schrieb:
> qApp->setPalette( qApp->style()->standardPalette() );
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
>
--
[ signature omitted ]
Message 6 in thread
I think what you need see "Styles example" and paint gradient manually.
Johannes Diemke wrote:
> well this sets the standard platette. what i need is a something like a
> gray QPushButton in plastique style with a color gradient like seen in
> the standard palette for the plastique style.
>
> pal.setBrush(QPalette::Button, QColor(92, 92, 92));


Message 7 in thread
> well i tryed to color my buttons in plastique style so they look more
> colorfull. tho i know have some nice colored QPushbuttons it happends
> that they look very flat due to the fact that they are filled with
just
> one single color.
>
> in the qt designer in the preview with plastique style buttons have a
> color gradient. i seem not to be able to find the pallette entry to
get
> a color gradient working...
>
> does anyone know how to do that :) ?
The buttons in plastique style are images afaik, so you'll need to
modify these images if you want another color.
Cheers,
Peter
--
[ signature omitted ]
Message 8 in thread
Johannes Diemke wrote:
> hi,
>
> well i tryed to color my buttons in plastique style so they look more
> colorfull. tho i know have some nice colored QPushbuttons it happends
> that they look very flat due to the fact that they are filled with just
> one single color.
>
> in the qt designer in the preview with plastique style buttons have a
> color gradient. i seem not to be able to find the pallette entry to get
> a color gradient working...
>
> does anyone know how to do that :) ?
>
You can set a Style Sheet
(http://doc.trolltech.com/4.2/stylesheet.html). Look at the border-image
property and the example examples/widget/stylesheet.
Girish
--
[ signature omitted ]