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

Olivier Goffart olivier at woboq.com
Fri Dec 4 14:32:19 CET 2015

On Friday 4. December 2015 12:10:10 René J.V. Bertin wrote:
> Hi,
> What are the native classes (widgets) used to implement QTabBar and
> QTabWidget widgets on OS X? I was expecting NSTabView and family, but can
> find no occurrence of anything related in the source.

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.

I hope this answer your question.


Woboq - Qt services and support - http://woboq.com - http://code.woboq.org

More information about the Development mailing list