2017-05-04 3 views

답변

1

스타일 시트 아래에 개별 탭에 모든 탭의 왼쪽에 이미지를 추가 할 수 있지만하지 않습니다. 그러나 최종 결과를 연마하려면 CSS의 다른 속성을 조정해야 할 가능성이 큽니다.

QTabWidget > QTabBar { 
    background: url(url-to-your-corner-image); 
    background-repeat: norepeat; 
    margin-top: 10px; /* whatever needed to center the image vertically */ 
} 
QTabWidget > QTabBar::tab:first { 
    margin-left: 10px; /* at least the width of your image */ 
} 
+0

thanks.it me much lot :) –

-1

당신은 고정 된 스타일을 가진 첫 번째 탭을 추가 할 수 있습니다 TabWidget stylesheet example

+1

질문은 아이콘을 탭에 추가하는 것이 아니라 QTabWidget에 추가하는 것입니다. – sithereal

+0

@sithereal 네, 너무 빨리 읽었습니다, 미안 해요.) –

관련 문제