Hi,

I am using qss to change widgets appearance.

I have a question about QListView using delegates. Is it possible to access colors defined in qss while painting in the delegate (method paint(QPainter * ipPainter, const QStyleOptionViewItem & iOption, const QModelIndex & iIndex) const) ?

I have tried with :

QColor backColor = qvariant_cast<QBrush>(iIndex.data(Qt::BackgroundRole)).color();

But it does not work.

Is there another way ?

--
*Nicolas Krieger*
_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to