标签:com styles margin round int :hover topic net ack
可以通过tabWidget->setStyleSheet方法,设置样式,包括tab的样式。
如
1 QTabWidget* m_MainTab; 2 m_MainTab->setStyleSheet("QTabWidget::pane{border-width:1px;border-color:rgb(96, 96, 96);\ 3 border-style: outset;background-color: rgb(96, 96, 96);} 4 QTabWidget::tab-bar{border-width:0px;} 5 QTabBar::tab{border-bottom-color: #FF0000; 6 border-top-left-radius: 0px; 7 border-top-right-radius: 0px; 8 min-width:100px; min-height:25px; 9 font:14px Times New Roman;10 padding: 0px;11 }12 QTabBar::tab:!selected {13 margin-top: 0px; margin-left: 30;14 border-image: url(:/images/tab/sel3.png);15 }16 QTabBar::tab:selected {17 color: blue;18 border-image: url(:/images/tab/sel3.png);19 }20 QTabBar::tab:hover:!selected {21 border-image: url(:/images/tab/sel3.png);22 }23 QTabBar::tab:selected {24 margin-left: 10;25 }");
找到的靠谱资料:
https://pastebin.com/08wFKNGP
https://www.cnblogs.com/findumars/p/4886330.html
https://bbs.csdn.net/topics/390632657?page=1
标签:com styles margin round int :hover topic net ack
原文地址:https://www.cnblogs.com/0523jy/p/9559713.html