Style checkbox for a QStandardItem.
-
wrote on 28 May 2015, 10:24 last edited by
I have a QStandardItem that at some point I make checkable
thumbIitem->setCheckable(true);
I would like to use my own icons for the checkbox though.
The only thing I could find was this answer on SO, but I am not sure how It can be applied in my case.
Does anyone know how to do this?
-
wrote on 28 May 2015, 10:45 last edited by
Hi,
have you tried to use that solution? What's the results?
-
wrote on 28 May 2015, 10:49 last edited by ealione
No I have not. Mostly because I am not sure how.
Obviously simply typing
thumbIitem::indicator:checked { image: url(.../Checkbox_checked_normal.png); }
Is not correct.
Since I have not cared much about stylesheets and appearance until now, I don't know how to proceed.Edit:
Also, Hi :) -
wrote on 28 May 2015, 14:08 last edited by
Hi,
have a look to
QWidget::setStyleSheet()
-
wrote on 2 May 2019, 15:12 last edited by
use this
QComboBox QAbstractItemView {
selection-background-color: lightgray;
}QAbstractItemView::indicator {
background-color: rgb(0, 255, 0);
width :20;
height :20;
}
QAbstractItemView::indicator:checked {
background-color: rgb(255, 170, 0);
}