What was the reason for redefining the paint method, where as it looks like simple QCheckBox(s) in a vertical layout could have done the job.
Handmade rectangles more beautiful

Thanks all, i will try those methods today...