[Qt-interest] QPalette ColorRole-s

Mihail Naydenov mlists at ymail.com
Fri Jan 28 22:04:58 CET 2011


Thank you for your answer.

I look at palette as a ready-made way to pass the same colors across widgets - 
for custom ones I should be able to define custom colors, augmenting the current 
set.

thanks
MihailNaydenov



----- Original Message ----
> From: Girish Ramakrishnan <girish at forwardbias.in>
> To: Mihail Naydenov <mlists at ymail.com>
> Cc: qt-interest at trolltech.com
> Sent: Fri, January 28, 2011 8:00:27 PM
> Subject: Re: [Qt-interest] QPalette ColorRole-s
> 
> Hi,
> 
> On Thu, Jan 27, 2011 at 8:13 PM, Mihail Naydenov <mlists at ymail.com> wrote:
> > Is there  a particular reason for not having a UserRole last-enum-value in
> >  ColorRole? So one can define custom roles.
> >
> 
> QPalette was designed  to be the Windows system palette, if you recall
> the Windows 2000  appearance/color scheme dialog. It isn't meant to be
> extensible since those  colors are preset.
> 
> > I guess it is to reinforce color reuse, but  limits the usability of the 
>class
> > for creating custom  widgets.
> >
> > How is this supposed to be handled?
> >
> 
> You  want custom widgets to pull colors from a palette with custom
> roles? One  approach might be to create a custom palette data structure
> and set it as a  dynamic property (or style hint) of the  application's
> QStyle.
> 
> Girish
> 


      



More information about the Qt-interest-old mailing list