How to stylize checkboxes in treeview?
gd_qtreeview.png
How to stylize checkboxes in treeview?
gd_qtreeview.png
I presume they are just normal checkboxes?
Just create a stylesheet for checkboxes and apply it to the treeview
QCheckBox::indicator:unchecked
{
color:rgb(255,0,0);
}
QCheckBox::indicator:checked
{
color:rgb(0,0,255);
}
or if you want to make one global stylesheet and not affect any other checkboxes use the child selector (all the checkboxes need to be a direct child of the QTreeView else use a space instead of > )
QTreeView > QCheckBox::indicator:unchecked
{}
QTreeView > QCheckBox::indicator:checked
{}
Last edited by StrikeByte; 10th November 2014 at 15:23.
It is not work!! QCheckBox already styled.
And i try your solution
But still nothing
I aready find solution
http://qt-project.org/forums/viewthread/49497/
Bookmarks