Changing window titlebar colour in macOS



  • Hi, I would like to change the colour of the window titlebar on OSX/macOS.

    Does anyone have a route to do that ? My Cocoa/Objective C skills are not so strong; I'm thinking

    QWidget::winId() gets me an NSView, use [nsview window] to get an NSWindow and then window.titlebarAppearsTransparent = true; window.backgroundColor = my_colour; but it seems to me that I would need to access some Qt internals that are not exposed to me.


  • Qt Champions 2016

    Hi
    Qt do not draw or handle the title bar on any platform.
    Im 100% macintosh noob so might be different on that OS but on windows or
    linux you cannot directly from Qt change the color as it not controlled by Qt at all.



  • Hi mrjj,

    My understanding is that Qt wraps native widgets as much as possible so I am looking for way to effect a titlebar colour change in a Qt friendly way.

    If I can access the native elements, such as with QWidget::winId() then maybe it's possible to do it but I don't know enough about Mac and Objective C which is why I am asking here.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.