Qt-interest Archive, February 2007
newbie stylesheet question
Message 1 in thread
I am new to this list and fairly new to Qt4 (I have experience with
Qt3). I am working on a protoype that requires custom colors for
everything. This is easy to do with the palettes, and perhaps even easier with style sheets. I am very new to using style sheets and have a question.
Given that I need to use many custom colors, is there any way to create definitions in the style sheets for the custom rgb colors? This is so that if they need to change, then I only need to change them in one place.
I've researched style sheets on the web, in general, and can't find anything that tells me this is possible.
Any help is greatly appreciated & thanks in advance,
Susan
_____________________________
Susan Macchia
mailto:susan@xxxxxxxxxxxx
http://www.smacchia.net
_____________________________
--
[ signature omitted ]
Message 2 in thread
Susan Macchia wrote:
> I am new to this list and fairly new to Qt4 (I have experience with
> Qt3). I am working on a protoype that requires custom colors for
> everything. This is easy to do with the palettes, and perhaps even easier with style sheets. I am very new to using style sheets and have a question.
>
> Given that I need to use many custom colors, is there any way to create definitions in the style sheets for the custom rgb colors?
It is not possible using style sheets to create definitions for custom
colors. You can, however, use any of the color names listed in
http://www.w3.org/TR/SVG/types.html#ColorKeywords.
Girish
--
[ signature omitted ]
Message 3 in thread
Susan,
Depending on what you really want to do you might be able to get the
same effect by resetting the global palette on QApplication which is
sort of "inherited" down the parent/child hierarchy of the widgets.
--Justin
Susan Macchia wrote:
> I am new to this list and fairly new to Qt4 (I have experience with
> Qt3). I am working on a protoype that requires custom colors for
> everything. This is easy to do with the palettes, and perhaps even easier with style sheets. I am very new to using style sheets and have a question.
>
> Given that I need to use many custom colors, is there any way to create definitions in the style sheets for the custom rgb colors? This is so that if they need to change, then I only need to change them in one place.
>
> I've researched style sheets on the web, in general, and can't find anything that tells me this is possible.
>
> Any help is greatly appreciated & thanks in advance,
> Susan
>
> _____________________________
> Susan Macchia
> mailto:susan@xxxxxxxxxxxx
> http://www.smacchia.net
> _____________________________
>
>
>
>
>
> --
> 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/
>
>
begin:vcard
begin:vcard
fn:Justin Noel
n:Noel;Justin
org:ICS;Engineering
adr:;;54B Middlesex Trpk;Bedford;MA;01730;USA
email;internet:justin@xxxxxxx
title:Sr. Consulting Engineer / Certified Qt Instructor
tel;work:(617) 621-0060
url:http://www.ics.com
version:2.1
end:vcard
Message 4 in thread
Thanks! I've been using QPalette pretty heavily for most of the customization. Only in a couple of places did I use a style sheet which I applied programatically. And this was because of a bug in the setting of the combo box menu colors using QPalette (the style sheet worked, QPalette didn't; guess I should report this...)
In any event, there are so many custom colors for this app, that QPalette, in most cases is what I need. Setting it on the top level widgets and individual controls if they must diverge from the more global setting.
----- Original Message ----
From: Justin Noel <justin@xxxxxxx>
To: qt-interest@xxxxxxxxxxxxx
Sent: Monday, February 26, 2007 11:09:52 AM
Subject: Re: newbie stylesheet question
Susan,
Depending on what you really want to do you might be able to get the
same effect by resetting the global palette on QApplication which is
sort of "inherited" down the parent/child hierarchy of the widgets.
--Justin
Susan Macchia wrote:
> I am new to this list and fairly new to Qt4 (I have experience with
> Qt3). I am working on a protoype that requires custom colors for
> everything. This is easy to do with the palettes, and perhaps even easier with style sheets. I am very new to using style sheets and have a question.
>
> Given that I need to use many custom colors, is there any way to create definitions in the style sheets for the custom rgb colors? This is so that if they need to change, then I only need to change them in one place.
>
> I've researched style sheets on the web, in general, and can't find anything that tells me this is possible.
>
> Any help is greatly appreciated & thanks in advance,
> Susan
>
> _____________________________
> Susan Macchia
> mailto:susan@xxxxxxxxxxxx
> http://www.smacchia.net
> _____________________________
>
>
>
>
>
> --
> 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/
>
>
begin:vcard
fn:Justin Noel
n:Noel;Justin
org:ICS;Engineering
adr:;;54B Middlesex Trpk;Bedford;MA;01730;USA
email;internet:justin@xxxxxxx
title:Sr. Consulting Engineer / Certified Qt Instructor
tel;work:(617) 621-0060
url:http://www.ics.com
version:2.1
end:vcard
--
[ signature omitted ]