Custom TabBar

From Qt Wiki
Revision as of 15:14, 14 January 2015 by Maintenance script (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

English Български

Custom QTabBar

Something I quickly put up to demonstrate how to define a custom QTabBar [qt.io], which shows an image always center aligned (The default QTabBar aligns the icon to the left always).

The custom tab bar class, here only showing one tab being added, the same can be extended to more tabs

The custom tab widget class, which uses the custom tab bar

Calling it from mainwindow.cpp as follows:

Categories: