PDA

View Full Version : How to set StyleSheet for checkbox in QTreeView;



visor_ua
25th September 2008, 13:38
Is possible to set stylesheet for checkable items in QTreeView.
QTreeView::item:checked, QCheckBox::indicator:checked are not working:-(

chezifresh
31st January 2009, 03:58
Just like you would a QCheckBox only with a QTreeView

QTreeView::indicator:checked {
image: url(path);
}
QTreeView::indicator:unchecked {
image: url(path);
}

lengshuang
7th April 2009, 11:02
Just like you would a QCheckBox only with a QTreeView

QTreeView::indicator:checked {
image: url(path);
}
QTreeView::indicator:unchecked {
image: url(path);
}
then if i wanna insert QcheckBox to the QTreeView,how can i do it?

talk2amulya
7th April 2009, 12:46
u dont have to insert QCheckbox as a whole into QTreeView, just set the path to image for checked and unchecked states of the checkbox..these images can be any image u want..just follow what chezifresh wrote.