Hi,
I'm trying to display a background color for all items of my model.
I've tried to return a QColor in my data method for BackgroundRole. But this
color is only displayed if the mouse is over one row of my view. This color
is not displayed for all the rows of my view.
I don't understand why, cause if I do the same thing but with
DecorationRole, it works great (ie all the rows of my view have this
decoration).
Thanks for your help
Vincent
---------------8< -------------------
public Object data(QModelIndex index, int role) {
Object data = null;
if (index != null) {
if (role == Qt.ItemDataRole.DisplayRole }
data = "data";
} else if (role == Qt.ItemDataRole.DecorationRole) {
data = QColor.blue;
} else if (role == Qt.ItemDataRole.BackgroundRole) {
data = QColor.blue;
}
}
return data;
}
-------------8<-----------------------
_______________________________________________
Qt-jambi-interest mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest