Reputation: 316
Can i stylize QTreeWidgetItem like QCheckbox?
For my checkboxes style is:
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);
}
And what style would be for QTreeWidgetItem? I can't find it in documentation :(
Thanks!
Upvotes: 2
Views: 3486
Reputation: 765
See: http://qt-project.org/doc/qt-4.8/stylesheet-reference.html#qtreeview-widget
Also, http://doc.qt.digia.com/4.7-snapshot/qtreewidgetitem.html There are quite a few "set" member functions for styling.
Maybe relevant:
HowTo draw QTreeWidgetItem with different style?
http://www.qtcentre.org/threads/26738-QTreeWidget-StyleSheet-problem
Upvotes: 1