How to properly code Oxygen-compatible paint events for QFrame-derived widgets?

Hans Meine hans_meine at gmx.net
Mon Feb 2 16:48:02 GMT 2009


Hi again,

and sorry for replying to myself / bothering the list.

On Monday 02 February 2009 17:37:26 Hans Meine wrote:
> is there documentation somewhere how to properly draw in QFrame-derived
> widgets in order to fill the the sunken area within the round corners
> a) completely (normally, you get "ugly" 1px borders due to the rounded
>    corners), and
> b) ideally without painting over the focus glow?

I accomplished what I wanted by using QFrame::drawFrame after drawing the 
contents (allows for the focus glow overpainting my contents), and I increased 
the area drawn by a border of lineWidth() pixels, which seems to do the trick.

The only question remaining is whether this is really the correct way, but it 
looks quite OK to me (both code-wise and visually) actually.

Sorry if this was/is off-topic here,
  Hans




More information about the kde-core-devel mailing list