diff --git a/sources/mainwindow.cpp b/sources/mainwindow.cpp index afefd13..2e62a5f 100644 --- a/sources/mainwindow.cpp +++ b/sources/mainwindow.cpp @@ -11,15 +11,15 @@ MainWindow::MainWindow(QWidget *parent) spinExp = ui->spinExp; spinMod = ui->spinMod; - //SQMTableModel test; - //resultTable->setModel(&test); - //resultTable->show(); + + resultTable = ui->resultTable; connect(spinBase, SIGNAL(valueChanged(int)), this, SLOT(SetModel())); connect(spinExp, SIGNAL(valueChanged(int)), this, SLOT(SetModel())); connect(spinMod, SIGNAL(valueChanged(int)), this, SLOT(SetModel())); - resultTable = ui->resultTable; + + } MainWindow::~MainWindow() { @@ -35,5 +35,5 @@ void MainWindow::SetModel() { resultTableModel.SetStartValues(base, exp, mod); resultTable->setModel(&resultTableModel); - resultTable->show(); + //resultTable->show(); } diff --git a/sources/sqmtablemodel.cpp b/sources/sqmtablemodel.cpp index eecbea6..c69625d 100644 --- a/sources/sqmtablemodel.cpp +++ b/sources/sqmtablemodel.cpp @@ -18,10 +18,11 @@ int SQMTableModel::columnCount(const QModelIndex & /*parent*/) const { QVariant SQMTableModel::data(const QModelIndex &index, int role) const { if (role == Qt::DisplayRole) { - int row = index.row(); - int col = index.column(); +// int row = index.row(); +// int col = index.column(); - return sqmMatrix.at(col).at(row); +// return sqmMatrix.at(col).at(row); + return "test"; } return QVariant(); }