From 0bded9e4a2bbbf064ecc666eb02a2417e6816920 Mon Sep 17 00:00:00 2001 From: moerp Date: Fri, 28 May 2021 17:53:57 +0200 Subject: [PATCH] debugging --- sources/mainwindow.cpp | 10 +++++----- sources/sqmtablemodel.cpp | 7 ++++--- 2 files changed, 9 insertions(+), 8 deletions(-) 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(); }