drawing icons in a table with QStyledItemDelegate paint()
问题 I'm trying to implement a custom paint function for a QStyledItemDelegate subclass (QT4.8.2). I've reviewed the StarItemDelegate example, among others, and it appears to be pretty straightforward. The delegate is assigned to a column of the table that indicates the record state. Column items are editable, but not user editable. I've implemented the delegate subclass and have proven that it works, but can't seem to get it to draw a simple icon. The code for the paint function is: { painter-