summaryrefslogtreecommitdiffstats
path: root/examples/tutorials/modelview/1_readonly/mymodel.h
blob: aac1bf05dbfe2398f4cc190cddee7bbc813b4160 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! [Quoting ModelView Tutorial]
#ifndef MYMODEL_H
#define MYMODEL_H

#include <QAbstractTableModel>

class MyModel : public QAbstractTableModel
{
    Q_OBJECT
public:
    MyModel(QObject *parent);
    int rowCount(const QModelIndex &parent = QModelIndex()) const ;
    int columnCount(const QModelIndex &parent = QModelIndex()) const;
    QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
};

#endif // MYMODEL_H
//! [Quoting ModelView Tutorial]