diff options
author | Michael D Scull <ext-michael.scull@nokia.com> | 2010-05-27 13:12:58 (GMT) |
---|---|---|
committer | David Boddie <dboddie@trolltech.com> | 2010-07-07 15:07:53 (GMT) |
commit | f574700f920ae5d5bda25ba217d6face9f3d3902 (patch) | |
tree | a4db1390147f7b6041ca763be6715078b1ddd9ab /examples/tutorials/modelview/4_headers/mymodel.h | |
parent | 4df3fb13821e13ecf581d87f2d224b2f1b964609 (diff) | |
download | Qt-f574700f920ae5d5bda25ba217d6face9f3d3902.zip Qt-f574700f920ae5d5bda25ba217d6face9f3d3902.tar.gz Qt-f574700f920ae5d5bda25ba217d6face9f3d3902.tar.bz2 |
Rolands ModelView Source
Diffstat (limited to 'examples/tutorials/modelview/4_headers/mymodel.h')
-rwxr-xr-x | examples/tutorials/modelview/4_headers/mymodel.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/examples/tutorials/modelview/4_headers/mymodel.h b/examples/tutorials/modelview/4_headers/mymodel.h new file mode 100755 index 0000000..327ca10 --- /dev/null +++ b/examples/tutorials/modelview/4_headers/mymodel.h @@ -0,0 +1,17 @@ +#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; + QVariant headerData(int section, Qt::Orientation orientation, int role) const; +}; + +#endif // MYMODEL_H |