In Qt and specifically the QCalendarWidget the disabled(unclickable) dates by default have a grey background. However, I need to style those with a QSS file.
My problem is that I can't find the attribute in the Qt API. For example the items for selection and in general can be styled as such
QAbstractItemView {
color:#444;
alternate-background-color: #eee;
selection-background-color: #0F4A8C;
selection-color:#fff;
}
Any suggestion how could I set the background color of a disabled item?
Apparently, for the dates which are out of range, you can't style them and you need to overwrite the QCalendar's
paintCell(painter, rect, date)
function like this: