What is the difference between QItemDelegate and QStyledItemDelegate?
问题 Both classes provide display and editing facilities for data items from a model. QStyledItemDelegate is newer and the Qt documentation about QItemDelegate states that : Note that QStyledItemDelegate has taken over the job of drawing Qt's item views. We recommend the use of QStyledItemDelegate when creating new delegates. I am confused what's the difference between the two and why QStyledItemDelegate is preferred over QItemDelegate ! 回答1: As mentioned in the QStyledItemDelegate documentation,