-
-
Save xenjee/ba500d670f2e5e4c6b15f600771cc502 to your computer and use it in GitHub Desktop.
A QTabWidget Custom Stylesheet Example
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
QTabWidget::pane { | |
border: 1px solid black; | |
background: white; | |
} | |
QTabWidget::tab-bar:top { | |
top: 1px; | |
} | |
QTabWidget::tab-bar:bottom { | |
bottom: 1px; | |
} | |
QTabWidget::tab-bar:left { | |
right: 1px; | |
} | |
QTabWidget::tab-bar:right { | |
left: 1px; | |
} | |
QTabBar::tab { | |
border: 1px solid black; | |
} | |
QTabBar::tab:selected { | |
background: white; | |
} | |
QTabBar::tab:!selected { | |
background: silver; | |
} | |
QTabBar::tab:!selected:hover { | |
background: #999; | |
} | |
QTabBar::tab:top:!selected { | |
margin-top: 3px; | |
} | |
QTabBar::tab:bottom:!selected { | |
margin-bottom: 3px; | |
} | |
QTabBar::tab:top, QTabBar::tab:bottom { | |
min-width: 8ex; | |
margin-right: -1px; | |
padding: 5px 10px 5px 10px; | |
} | |
QTabBar::tab:top:selected { | |
border-bottom-color: none; | |
} | |
QTabBar::tab:bottom:selected { | |
border-top-color: none; | |
} | |
QTabBar::tab:top:last, QTabBar::tab:bottom:last, | |
QTabBar::tab:top:only-one, QTabBar::tab:bottom:only-one { | |
margin-right: 0; | |
} | |
QTabBar::tab:left:!selected { | |
margin-right: 3px; | |
} | |
QTabBar::tab:right:!selected { | |
margin-left: 3px; | |
} | |
QTabBar::tab:left, QTabBar::tab:right { | |
min-height: 8ex; | |
margin-bottom: -1px; | |
padding: 10px 5px 10px 5px; | |
} | |
QTabBar::tab:left:selected { | |
border-left-color: none; | |
} | |
QTabBar::tab:right:selected { | |
border-right-color: none; | |
} | |
QTabBar::tab:left:last, QTabBar::tab:right:last, | |
QTabBar::tab:left:only-one, QTabBar::tab:right:only-one { | |
margin-bottom: 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment