New in 4.3: Unified title and toolbar on Mac OS X
Well, we are closing in on 4.3 and it looks like it is shaping up to be a good release. Of course, this is what I usually think with every release. Anyway, since I usually talk about “Mac things,” I thought I would take this opportunity to show off something that seems to caused a bit of a local stir at work, Mac OS X unified toolbars.
If you are running Mac OS X 10.4 or higher (Tiger if you think in cats), you have seen that many applications have there toolbars blending right into the title bar. You probably were wondering, “How did they do that?” Probably followed up by a “how can I do that in Qt?”
Well, with 4.2, it was possible to do (though you would have to write a fair amount of code). That’s usually enough to make a programmer reconsider the endeavor. With Qt 4.3, though, we’ve made it fairly easy. Simply create your QMainWindow and toolbars as normal. Then take a look at the QMainWindow::setUnifiedTitleAndToolBarOnMac() property. This will put all the toolbars in the top toolbar area and does the magic to blend the toolbars into the title bar. It’s that simple!
So, how does it look? Well, we added it to Assistant. The before and after picture are below, take a look:
If you want to take a look at this in the snapshots and provide feedback, please do. Don’t report that the window doesn’t stay in the same spot the next time you open the application, though. We are already aware of that issue and are working on it.
More on Qt
- Security advisory: Multiple third-party Chromium vulnerabilities fixed in Chrome 153.0.8010.52 impact Qt WebEngine
- Security advisory: Multiple third-party Chromium vulnerabilities fixed in Chrome 154.0.8037.93 impact Qt WebEngine
- Security advisory: CVE-2026-118968: Denial-of-service vulnerability in WAV audio decoding impacts Qt
