[Interest] Using stylesheets in QStyledItemDelegate

Philipp Kursawe phil.kursawe at gmail.com
Wed Sep 25 15:07:04 CEST 2013


Is there a reason why Qt does not allow us to have access to defined
stylesheets?
In my QStyledItemDelegate I would like to query for certain CSS style
definitions to know which icon to draw and in which color based on the
items content/state.

I think a workaround would be to create a QWidget on the fly and set
its "class" property so that it gets assigned styles from CSS and then
using this widgets style() to paint in my QStyledItemDelegate.

Something like QStyledItemDelegate::style()->getBorderColor() would be nice.



More information about the Interest mailing list