Commit 8dd71a91 authored by Daniel Molkentin's avatar Daniel Molkentin
Browse files

Let the ListModel wizard generate a valid model.

parent 9beab974
......@@ -17,7 +17,7 @@ int %ClassName%::rowCount(const QModelIndex &) const
return items.size();
}
QVariant %ClassName%::data(const QModelIndex &index, int)
QVariant %ClassName%::data(const QModelIndex &index, int) const
{
return items.at(index.row());
}
......@@ -11,7 +11,7 @@ public:
void addItems(const QList<%Datatype%> &items);
virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;
virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole);
virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
private:
QList<%Datatype%> items;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment