Skip to content

Instantly share code, notes, and snippets.

@xenjee
Forked from espdev/qtabwidget.css
Created May 4, 2022 07:32
Show Gist options
  • Save xenjee/ba500d670f2e5e4c6b15f600771cc502 to your computer and use it in GitHub Desktop.
Save xenjee/ba500d670f2e5e4c6b15f600771cc502 to your computer and use it in GitHub Desktop.

Revisions

  1. @espdev espdev revised this gist May 19, 2016. 1 changed file with 4 additions and 2 deletions.
    6 changes: 4 additions & 2 deletions qtabwidget.css
    Original file line number Diff line number Diff line change
    @@ -57,7 +57,8 @@ QTabBar::tab:bottom:selected {
    border-top-color: none;
    }

    QTabBar::tab:top:last, QTabBar::tab:bottom:last {
    QTabBar::tab:top:last, QTabBar::tab:bottom:last,
    QTabBar::tab:top:only-one, QTabBar::tab:bottom:only-one {
    margin-right: 0;
    }

    @@ -83,6 +84,7 @@ QTabBar::tab:right:selected {
    border-right-color: none;
    }

    QTabBar::tab:left:last, QTabBar::tab:right:last {
    QTabBar::tab:left:last, QTabBar::tab:right:last,
    QTabBar::tab:left:only-one, QTabBar::tab:right:only-one {
    margin-bottom: 0;
    }
  2. @espdev espdev renamed this gist May 19, 2016. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. @espdev espdev created this gist May 19, 2016.
    88 changes: 88 additions & 0 deletions custom_qtabwidget.qss
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,88 @@
    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 {
    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 {
    margin-bottom: 0;
    }