How to properly code Oxygen-compatible paint events for QFrame-derived widgets?
Matthew Woehlke
mw_triad at users.sourceforge.net
Wed Feb 4 00:13:30 GMT 2009
Hans Meine wrote:
> 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.
Neat. Now... how do we get this to work with *all* frames so we don't
have e.g. buggy lists? ;-) (Read: how do we get Qt to adopt this?)
--
Matthew
Please do not quote my e-mail address unobfuscated in message bodies.
--
Anyone who is capable of getting themselves made President should on no
account be allowed to do the job. -- The Hitchhiker's Guide to the
Galaxy (Douglas Adams)
More information about the kde-core-devel
mailing list