Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Stylesheet and QTabBar - which element is this?
Forum Updated to NodeBB v4.3 + New Features

Stylesheet and QTabBar - which element is this?

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 858 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • qwasder85Q Offline
    qwasder85Q Offline
    qwasder85
    wrote on last edited by
    #1

    Pictured in this screenshot of a QTabBar (bottom tabs!), how do I address the marked border line?
    alt text
    It does not seem to be QTabBar-border or QTabBar::pane-border.

    Here's my qss-code:

    QTabBar {
        background: #f3f3f3;
    }
    
    QTabBar::tab {
        background-color: white;
        border: 1px solid #cccccc;
        min-width: 30px;
        padding: 2px;
        padding-left: 5px;
        padding-right: 5px;
        margin-left: 2px;
    }
    
    QTabBar::tab:first {
        margin-left: 0px;
    }
    
    QTabBar::tab:selected {
        border-top-color: white;
    }
    
    QTabBar::tab:!selected {
        margin-bottom: 2px;
    }
    

    These tabs are created by "tabifying" QDockWidgets, so I'm not sure whether or not that's actually a complete QTabWidget, or just a QTabBar.

    Any suggestions?

    1 Reply Last reply
    0
    • E Offline
      E Offline
      Echo_001
      wrote on last edited by Echo_001
      #2

      I have the same problem, When i tabifyDockWidgets, Tabbar will occure and I can't find QSS can modify this line's color.

      0_1522919734918_QTabBar_QDockWidget.png

      and below is the ui file, anyone can use it to test this problem. the stylesheet is in the mainwindow.
      test.ui

      look at the picture below
      blue color : QDockWidget > QWidget border : 5px solid rgb(0, 0, 255)
      green color : QTabBar background : rgb(0, 255, 0)
      read color : QTabBar border : 5px solid rgb(255, 0, 255)
      0_1522922357779_QDockWidget.png

      then, the gray line is still exist. looks like it is not a part of QDockWidget or QTabBar.

      Notice: The QTabbar border-top only have 4px, but border-bottom have 5px.

      1 Reply Last reply
      0
      • G Offline
        G Offline
        gamesun
        wrote on last edited by
        #3

        I have the same problem too. try adding

        QTabBar {
            qproperty-drawBase: 0;
        } 
        

        btw, if DockWidgets will be dragged, look this: topic/59450

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved