curreli
29th July 2010, 16:54
Hi,
I have a stylesheet for a QListView which is linked to a QStyledItemDelegate in order to paint item in a custom way.
I have a problem when adding some style for the items:
String style = "QListView {background: url(" + GlobalConstants.IMAGE_PATH + "background.png); }";
style += " QListView::item { color: white; }";
style += " QListView::item:hover { color: red; }";
The QListView style works fine but the QListView::item style does not appear.
I've tried to unlink the QStyledItemDelegate and the item style did work!
So my question is, how can we set style for the list items when using a delegate?
Thanks.
I have a stylesheet for a QListView which is linked to a QStyledItemDelegate in order to paint item in a custom way.
I have a problem when adding some style for the items:
String style = "QListView {background: url(" + GlobalConstants.IMAGE_PATH + "background.png); }";
style += " QListView::item { color: white; }";
style += " QListView::item:hover { color: red; }";
The QListView style works fine but the QListView::item style does not appear.
I've tried to unlink the QStyledItemDelegate and the item style did work!
So my question is, how can we set style for the list items when using a delegate?
Thanks.