| 32 | } |
| 33 | |
| 34 | QVariant EditableTypesModel::data(const QModelIndex &index, int role) const |
| 35 | { |
| 36 | if (!index.isValid()) |
| 37 | return QVariant(); |
| 38 | |
| 39 | const int type = m_types.at(index.row()); |
| 40 | if (role == Qt::DisplayRole) |
| 41 | return QMetaType(type).name(); |
| 42 | else if (role == Qt::UserRole) |
| 43 | return type; |
| 44 | |
| 45 | return QVariant(); |
| 46 | } |