This patch introduces an optional new/modern look for named menu section headers to the Qt4 and Qt5 style plugins.
The context:
I have been tinkering with (minimal changes to) Qt's Cocoa backends to enable full support of named menu sections ("texted separators") on Mac, so that QMenu::addSection() can be used more reliably for menu organisation. Native menubar menus are the limiting factor there; the other menus adopt a slightly elaborated version of the solution that works in native menus. The resulting look is inspired by Google Chrome's solution as used e.g. in its history menu but also borrows from Fusion's design.
Initially I planned to propose a hardwired implementation of that menu section header design in QtCurve on Mac so that menus there (not attached to the native menubar) look more like how they could look with the native "macintosh" style. Then I noticed I prefer the new look over the old "button-like" look which I always found somewhat confusing, and realised others might too.
The current design uses left-aligned text, underlined and rendered in bold, with an overlying separator that is also left-aligned. Alignment is done w.r.t. the check/icon position, and of course flips when switching to a right-to-left rendering mode. On Mac there is also a tiny amount of letter-spacing contraction to increase visual impact (this doesn't work well with the Freetype engine IMHO).