2

我可以像 QCheckbox 一样对 QTreeWidgetItem 进行风格化吗?

对于我的复选框样式是:

 QCheckBox {
     spacing: 15px;
 }

 QCheckBox::indicator {
     width: 20px;
     height: 20px;
 }

 QCheckBox::indicator:unchecked {
     image: url(:/styles/img/checkbox_unchecked.png);
 }

 QCheckBox::indicator:unchecked:hover {
     image: url(:/styles/img/checkbox_unchecked_hover.png);
 }

 QCheckBox::indicator:checked {
     image: url(:/styles/img/checkbox_checked.png);
 }

 QCheckBox::indicator:checked:hover {
     image: url(:/styles/img/checkbox_checked_hover.png);
 }

QTreeWidgetItem 的风格是什么?我在文档中找不到它:(

谢谢!

4

1 回答 1