Custom TabBar: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
(No difference)

Revision as of 15:14, 14 January 2015

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: