Last active
September 12, 2016 12:37
-
-
Save bjorn/85c7fe4ce9b7d6a1e385237fe6ea4f4f to your computer and use it in GitHub Desktop.
Drawing tab bar base behind some other control
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
QStylePainter p(this); | |
QStyleOptionTab tabOverlap; | |
int overlap = style()->pixelMetric(QStyle::PM_TabBarBaseOverlap, &tabOverlap); | |
QStyleOptionTabBarBase tabBarStyleOption; | |
tabBarStyleOption.rect.setRect(0, height() - overlap, width(), overlap); | |
tabBarStyleOption.tabBarRect = rect(); | |
p.drawPrimitive(QStyle::PE_FrameTabBarBase, tabBarStyleOption); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment