debugging

This commit is contained in:
moerp
2021-05-28 17:53:57 +02:00
parent 1099d16455
commit 0bded9e4a2
2 changed files with 9 additions and 8 deletions

View File

@ -11,15 +11,15 @@ MainWindow::MainWindow(QWidget *parent)
spinExp = ui->spinExp; spinExp = ui->spinExp;
spinMod = ui->spinMod; spinMod = ui->spinMod;
//SQMTableModel test;
//resultTable->setModel(&test); resultTable = ui->resultTable;
//resultTable->show();
connect(spinBase, SIGNAL(valueChanged(int)), this, SLOT(SetModel())); connect(spinBase, SIGNAL(valueChanged(int)), this, SLOT(SetModel()));
connect(spinExp, SIGNAL(valueChanged(int)), this, SLOT(SetModel())); connect(spinExp, SIGNAL(valueChanged(int)), this, SLOT(SetModel()));
connect(spinMod, SIGNAL(valueChanged(int)), this, SLOT(SetModel())); connect(spinMod, SIGNAL(valueChanged(int)), this, SLOT(SetModel()));
resultTable = ui->resultTable;
} }
MainWindow::~MainWindow() { MainWindow::~MainWindow() {
@ -35,5 +35,5 @@ void MainWindow::SetModel() {
resultTableModel.SetStartValues(base, exp, mod); resultTableModel.SetStartValues(base, exp, mod);
resultTable->setModel(&resultTableModel); resultTable->setModel(&resultTableModel);
resultTable->show(); //resultTable->show();
} }

View File

@ -18,10 +18,11 @@ int SQMTableModel::columnCount(const QModelIndex & /*parent*/) const {
QVariant SQMTableModel::data(const QModelIndex &index, int role) const { QVariant SQMTableModel::data(const QModelIndex &index, int role) const {
if (role == Qt::DisplayRole) { if (role == Qt::DisplayRole) {
int row = index.row(); // int row = index.row();
int col = index.column(); // int col = index.column();
return sqmMatrix.at(col).at(row); // return sqmMatrix.at(col).at(row);
return "test";
} }
return QVariant(); return QVariant();
} }