我正在使用 QTabWidget,我想知道是否可以使用不同的图标作为选项卡上的关闭按钮?我认为 style 和 setCornerWidget 可能不适用于这种情况。
谢谢!
最佳答案
使用 setStyleSheet () 与
QTabBar::close-button {
image: url(close.png)
}
QTabBar::close-button:hover {
image: url(close-hover.png)
}
http://doc.qt.io/qt-4.8/stylesheet-examples.html#customizing-qtabwidget-and-qtabbar
关于qt4 - 选项卡上的不同关闭按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4523819/