2014-05-16 29 views
0

目前,我有以下樣式表我QtabWidgetQTabWidget造型 - 失蹤的底部我的 'G ... S'

QTAB 

QTabWidget 
{ 
    /* min-width:5000em;*/ 
} 


QTabWidget::tab-bar 
{ 
    left: 5px; /* move to the right by 5px */ 
} 


QTabWidget::pane 
{ 
    border-top: 1px solid gray; 
    border-left: 1px solid gray; 
    border-right: 1px solid gray; 
    border-bottom: 1px solid gray; 
} 

QTabBar::tab 
{ 
    background-color: rgb(166, 166, 166); 
    min-width: 70px; 

    padding-top : 6px; 
    padding-bottom : 8px; 
    color: rgb(255, 255, 255); 
    font: 10pt "Arial"; 
} 

QTabBar::tab:selected, QTabBar::tab:hover 
{ 
    background-color: rgb(127, 127, 127); 
} 

QTabBar::tab:selected 
{ 
    /*border-color: #9B9B9B;*/ 
} 

QTabBar::tab:!selected 
{ 
    margin-top: 2px; /* make non-selected tabs look smaller */ 

} 

這導致這樣的事情

enter image description here

我想知道如何修理我的'g'的底部,因爲它們似乎被切斷了?

回答

1

將在本部分中調整值增加更多的空間:

QTabBar::tab 
{ 
    background-color: rgb(166, 166, 166); 
    min-width: 70px; 

    padding-top : 6px; 
    padding-bottom : 8px; 
    color: rgb(255, 255, 255); 
    font: 10pt "Arial"; 
} 

例如添加容納足夠的空間爲您的文字的最小高度,也有在這裏是填充問題只是刪除線padding-top: 6pxpadding-bottom: 8px

QTabBar::tab 
{ 
    background-color: rgb(166, 166, 166); 
    min-width: 70px; 

    color: rgb(255, 255, 255); 
    font: 10pt "Arial"; 
} 

here是我編譯的結果。我沒有足夠的聲望點發布圖片。