Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

[Moved] Painting in the NonClientArea



  • Hi All!
    I want to create an application whit a custom TitleBar, I know that I can set the Widget with the FramelessWindowHint flag and create my own TitleBar as a widget in the Client Area, but doing it in this way I have to handle all the events of resizing, maximize, etc, etc by myself.

    The question is:
    Is there any way to paint over the Non Client Area in a window?



  • You might have a look into "this thread":http://developer.qt.nokia.com/forums/viewthread/3331/, seems to be the same problem.



  • Thanks!
    I'll check that!



  • Hi,

    in fact it's the same problem, but there is no full solution on the net now. I've managed to do it, but it takes time to do it in a way so it is usable for the wiki. It's a bit tricky to handle all repaint events, as there are often direct calls to NC_PAINT without the event loop. Wait a bit, it's on my list, but not for today or tomorrow...



  • Hi! I'll working on that almost full time...
    When I finish that it would be nice to share it on the wiki with a complete example and I'm sure that some improves will come out from that.

    Regards!



  • Any progress?

    [quote author="diegosarmentero" date="1297852088"]Hi! I'll working on that almost full time...
    When I finish that it would be nice to share it on the wiki with a complete example and I'm sure that some improves will come out from that.

    Regards![/quote]



  • I am working on this case too. Yes, Qt.FramelessWindowHint is not a solution. We'll have to draw in NCA. I am using PyQt by the way and still finding trouble of trying to create QPainter object. It creates this warning, QPainter::begin: Paint device returned engine == 0, type: 1

    Any suggestion?


Log in to reply