[Development] [OS X]: native classes (widgets) used for QTabBar and QTabWidget?

René J. V. Bertin rjvbertin at gmail.com
Tue Dec 8 21:38:10 CET 2015


Olivier Goffart wrote:

Hi,

> QWidgets (and QML) don't use native UI views. They draw everything themself.
> The drawing is done in the style (qmacstyle_mac.mm in this case)
> 
> So to repeat:
> QTabBar::paintEvent asks the style to paint the tabs
> QMacStyle::drawControl (see the case CE_TabBarTabShape) draws it.
> Apparently it's using HIThemeTabDrawInfo and HIThemeDrawTab.

If I may, do you also know how it is determined whether or not push buttons 
should show icons or not? There's no equivalent to Qt::AA_DontShowIconsInMenus
and I'm also trying to understand why certain KF5 applications (using 
kdelibs4support) always show icons in buttons when the KdePlatformTheme is used 
(on Mac and Linux), but not when the native Mac style is used. It's not directly 
caused by KdePlatformTheme, because otherwise all applications using it would 
always show icons in buttons, which is not the case (and the theme actually sets 
a theme hint which should lead to disabling the icon display).

Thanks,
R.




More information about the Development mailing list