diff --git a/sources/mainwindow.cpp b/sources/mainwindow.cpp index 6167448..afefd13 100644 --- a/sources/mainwindow.cpp +++ b/sources/mainwindow.cpp @@ -31,8 +31,9 @@ void MainWindow::SetModel() { int exp = spinExp->value(); int mod = spinMod->value(); + SQMTableModel resultTableModel; - resultTableModel->SetStartValues(base, exp, mod); - resultTable->setModel(resultTableModel); + resultTableModel.SetStartValues(base, exp, mod); + resultTable->setModel(&resultTableModel); resultTable->show(); } diff --git a/sources/mainwindow.h b/sources/mainwindow.h index 92f2e67..f8a6f65 100644 --- a/sources/mainwindow.h +++ b/sources/mainwindow.h @@ -27,7 +27,7 @@ private: Ui::MainWindow *ui; QSpinBox *spinBase, *spinExp, *spinMod; QTableView *resultTable; - SQMTableModel *resultTableModel; + //SQMTableModel *resultTableModel; }; #endif // MAINWINDOW_H