QtHPConnect/vartablemodel.cpp
2019-02-10 15:43:00 +02:00

27 lines
544 B
C++

#include "vartablemodel.h"
varTableModel::varTableModel(QObject *parent)
:QAbstractTableModel(parent)
{
}
int varTableModel::rowCount(const QModelIndex & /*parent*/) const
{
return 16;
}
int varTableModel::columnCount(const QModelIndex & /*parent*/) const
{
return 1;
}
QVariant varTableModel::data(const QModelIndex &index, int role) const
{
if (role == Qt::DisplayRole)
return QString("Row%1, Column%2")
.arg(index.row() + 1)
.arg(index.column() +1);
return QVariant();
}