I have some controls that draw some rectangles. This isn't a standard element so I can't just call one of the QStyle functions, in particular none of the drawPrimitive's really do what I need.

Nonetheless I'd still like to try and match the native style. So my colours come from QPalette, but I don't know how to get the rounding. That is, most frames in the style have a setting for rounded corners (some styles are square), I'd like to be able to match that.

How can I get the standard rounding of the current style?