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. Get 1px bottom border of QTabBar to fill full width of QTabWidget

Get 1px bottom border of QTabBar to fill full width of QTabWidget

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 846 Views
  • 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.
  • P Offline
    P Offline
    patrickkidd
    wrote on last edited by patrickkidd
    #1

    Hello!

    Does anyone know how to get the bottom border of QTabBar to fill the full width of a QTabWidget? The attached screenshot shows how this is not happening when the QTabWidget is wider than the width of the QTabBar.

    Here is my stylesheet. PopUp is the QWidget subclass where there are enough tabs to fill its child QTabWidget.

    QTabBar {                                                                                                                                                                       
        border-bottom: 1px solid #d0cfd1;                                                                                                                                           
    }                                                                                                                                                                               
    QTabBar::tab {                                                                                                                                                                  
        background: transparent;                                                                                                                                                    
        border-right: 1px solid #d0cfd1;                                                                                                                                            
        border-bottom: #d0cfd1;                                                                                                                                                     
        min-width: 8ex;                                                                                                                                                             
        font-size: 10px;                                                                                                                                                            
    }                                                                                                                                                                               
    QTabBar::tab:selected {                                                                                                                                                         
        color: blue;                                                                                                                                                                
        font-size: 11px;                                                                                                                                                            
    }                                                                                                                                                                               
    QTabBar::tab:first {                                                                                                                                                            
        border-left: 0;                                                                                                                                                             
        border-top-left-radius: 5px;                                                                                                                                                
    }                                                                                                                                                                               
    QTabBar::tab:last {                                                                                                                                                             
        border-right: 0;                                                                                                                                                            
        border-top-right-radius: 5px;                                                                                                                                               
    }                                                                                                                                                                               
    PopUp QTabWidget {                                                                                                                                                              
        border-top-left-radius: 5px;                                                                                                                                                
        border-top-right-radius: 5px;                                                                                                                                               
        background-color: transparent;                                                                                                                                              
    }                                                                                                                                                                               
    

    Thanks!

    0_1532013983601_2018-07-19_08-24-23.jpg

    https://alaskafamilysystems.com/

    kshegunovK 1 Reply Last reply
    0
    • P patrickkidd

      Hello!

      Does anyone know how to get the bottom border of QTabBar to fill the full width of a QTabWidget? The attached screenshot shows how this is not happening when the QTabWidget is wider than the width of the QTabBar.

      Here is my stylesheet. PopUp is the QWidget subclass where there are enough tabs to fill its child QTabWidget.

      QTabBar {                                                                                                                                                                       
          border-bottom: 1px solid #d0cfd1;                                                                                                                                           
      }                                                                                                                                                                               
      QTabBar::tab {                                                                                                                                                                  
          background: transparent;                                                                                                                                                    
          border-right: 1px solid #d0cfd1;                                                                                                                                            
          border-bottom: #d0cfd1;                                                                                                                                                     
          min-width: 8ex;                                                                                                                                                             
          font-size: 10px;                                                                                                                                                            
      }                                                                                                                                                                               
      QTabBar::tab:selected {                                                                                                                                                         
          color: blue;                                                                                                                                                                
          font-size: 11px;                                                                                                                                                            
      }                                                                                                                                                                               
      QTabBar::tab:first {                                                                                                                                                            
          border-left: 0;                                                                                                                                                             
          border-top-left-radius: 5px;                                                                                                                                                
      }                                                                                                                                                                               
      QTabBar::tab:last {                                                                                                                                                             
          border-right: 0;                                                                                                                                                            
          border-top-right-radius: 5px;                                                                                                                                               
      }                                                                                                                                                                               
      PopUp QTabWidget {                                                                                                                                                              
          border-top-left-radius: 5px;                                                                                                                                                
          border-top-right-radius: 5px;                                                                                                                                               
          background-color: transparent;                                                                                                                                              
      }                                                                                                                                                                               
      

      Thanks!

      0_1532013983601_2018-07-19_08-24-23.jpg

      kshegunovK Offline
      kshegunovK Offline
      kshegunov
      Moderators
      wrote on last edited by
      #2

      I don't think this is possible, sadly.

      Read and abide by the Qt Code of Conduct

      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