Painting custom widgets in Qt

I am working on a widget with a custom appearance. However, when I draw a rounded rectangle inside my widget, using the dimensions of the widget, the rounded rectange gets cut off by about 2-3 pixels along the right and bottom edges, and about 1 pixel along the top and left edges.

I set the widget’s contentMargins to 0, but that didn’t help…

what could be cropping off part of the widget?

Thanks.

i think I figured it out, I needed to offset the drawing of the line because by drawing the line along the exact dimensions of the widget, half the width of the line was falling outside the widget.