[Qt-interest] How to draw in the Non Client Area ?

Sean Harmer sean.harmer at maps-technology.com
Sun May 29 12:27:25 CEST 2011


On 29/05/2011 06:49, caoxingk wrote:
> There's a demo FAQ using c++/mfc to draw in the Non Client Area :
> [http://stackoverflow.com/questions/99623/how-to-draw-in-the-nonclient-area]
>
> -------------------------------------------------------
>
> But how to impliment it by Qt ?
>
> First I must bring my application out on Windows, even use pre-define syntax
>   like "#ifdef Q_OS_WIN" will be OK for me, but with no ideas for how.
>
> Or there's already have a Cross Platform Solution ? Ooooh, that couldn't be better.
>
> Thanks very much.

Looking at the stack overflow example it refers to drawing to the right 
of the menubar. This is still part of the client part fo the window 
though. It is drawn by QMenuBar which you are free to inherit from and 
add your own custom painting too. I think that kdevelop does something 
similar to this to implement the Review/Debug/Code tab bar 
(http://www.kdevelop.org/screenshots) so you may want to look there for 
some inspiration.

Cheers,

Sean



More information about the Qt-interest-old mailing list