[Qt-interest] Styling QCheckBox
Joshua Grauman
jnfo-c at grauman.com
Tue Mar 29 22:45:43 CEST 2011
Nevermind, you're right, changing QPalette::Text changes only the checkbox
color...
Josh
> Maybe I'm missing something, but I couldn't find a palette role that just
> effected only the checkmark itself, but I didn't try all of them so maybe
> one does that? Thanks, I'll look into it.
>
> Josh
>
>> Change the palette for that widget instance?
>>
>>
>>
>>
>> ----- Original Message ----
>> From: Joshua Grauman <jnfo-c at grauman.com>
>> To: qt-interest at qt.nokia.com
>> Sent: Tue, March 29, 2011 4:15:45 PM
>> Subject: [Qt-interest] Styling QCheckBox
>>
>> Hello all,
>>
>> I wanted to verify that I'm correct on this one. I want to color the
>> checkmark of a QCheckBox with multiple colors. From everything I can tell,
>> there's no way to do this directly. I can use a stylesheet, but I need a
>> separate picture for each color (and for each style for that matter!,
>> since I'm deploying to Mac/Linux/Windows). That would be unmanagable! I'm
>> thinking that there might be some way to color the checkbox differently by
>> subclassing QCheckBox and reimplementing the paintEvent function, but
>> looking at it I don't see any easy way to color the checkmark that way
>> either. Any ideas? Thanks!
>>
>> Josh
>> _______________________________________________
>> Qt-interest mailing list
>> Qt-interest at qt.nokia.com
>> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
>>
>>
>>
>>
>>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
>
More information about the Qt-interest-old
mailing list