1 #ifndef STRINGLISTMODEL_H
2 #define STRINGLISTMODEL_H
3 #include <QAbstractListModel>
7 class StringListModel : public QAbstractListModel
11 StringListModel(const QStringList &strings, QObject *parent = 0):QAbstractListModel(parent), stringList(strings) {}
12 int rowCount(const QModelIndex &parent = QModelIndex()) const;
13 QVariant data(const QModelIndex &index, int role) const;
14 QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
17 QStringList stringList;
20 #endif // STRINGLISTMODEL_H