[Qt-interest] How to fill QLabel Circles with different color

Stephan Rose kermos at somrek.net
Wed Jan 7 23:00:15 CET 2009


On Wed, 2009-01-07 at 21:31 +0000, Arun wrote:
> Thanks for your reply.
> Let us say if I have 3 label circles, which should fill up with 
> colors red, green and blue. If I have one variable for color 
> in my class, how paintEvent brush can fill these colors 
> at a time with three colors.

Depends on your implementation.

If each circle is represented by a separate label you will only need one
variable because you have 3 separate objects. Just the color value for
each as appropriate.

If your 3 circles are represented by one label object then you'll need 3
variables in your label class and set each as appropriate.

Stephan





More information about the Qt-interest-old mailing list