summaryrefslogtreecommitdiff
path: root/examples/tutorials/modelview/1_readonly/mymodel.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/tutorials/modelview/1_readonly/mymodel.h')
-rwxr-xr-xexamples/tutorials/modelview/1_readonly/mymodel.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/examples/tutorials/modelview/1_readonly/mymodel.h b/examples/tutorials/modelview/1_readonly/mymodel.h
new file mode 100755
index 0000000000..01ae6cb403
--- /dev/null
+++ b/examples/tutorials/modelview/1_readonly/mymodel.h
@@ -0,0 +1,16 @@
+#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