如上图所示,第一个tab可以设置图片,第三个tab也可以设置,但第二tab个不知道怎么设置。下面是设置sheetStyle的语句,设置第一个tab用了first,第三个tab用last,但第二个用second不行啊。
m_pTabWidget->setStyleSheet("\
QTabBar::tab\
{\
width:50px;\
height:25px;\
}\
QTabBar::tab:first:selected\
{\
background-image:url(:/image/Operater_MouseDown.png);\
}\
QTabBar::tab:first:!selected\
{\
background-image:url(:/image/Operater_Normal.png);\
}\
QTabBar::tab:first:hover\
{\
background-image:url(:/image/Operater_Hover.png);\
}\
QTabBar::tab:last:selected\
{\
background-image:url(:/image/Extend_MouseDown.png);\
}\
QTabBar::tab:last:!selected\
{\
background-image:url(:/image/Extend_Normal.png);\
}\
QTabBar::tab:last:hover\
{\
background-image:url(:/image/Extend_Hover.png);\