Constant Value Description Qt::DisplayRole 0 The key data to be rendered in the form of text. 数据以文本形式出现. (QString) Qt::DecorationRole 1 The data to be rendered as a decoration in the form of an icon. 数据作为图标出现(QColor, QIcon or QPixmap) Qt::EditRole 2 The data in a form suitable for editing in an editor. 表单中的数据适合在编辑器中编辑(QString) Qt::ToolTipRole 3 The data displayed in the item's tooltip. 数据显示Item提示(QString) Qt::StatusTipRole 4 The data displayed in the status bar. 数据现在在 status bar中 (QString) Qt::WhatsThisRole 5 The data displayed for the item in "What's This?" mode. 数据显示在"What's This?"mode中(QString) Qt::SizeHintRole 13 The size hint for the item that will be supplied to views. 项的大小提供给Views。