mirror of
https://github.com/Indy970/QtHPConnect
synced 2024-12-25 21:59:15 +01:00
27 lines
544 B
C++
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();
|
|
}
|