Commit 1539df10 authored by Hugo Hörnquist's avatar Hugo Hörnquist

fix double setting of editStrategy for productModel

parent 8bf942e1
......@@ -120,7 +120,7 @@ MainWindow::MainWindow(QWidget *parent) :
model = new QSqlTableModel;
model->setTable("products");
model->setEditStrategy(QSqlTableModel::OnManualSubmit);
model->setEditStrategy(QSqlTableModel::OnFieldChange);
// TODO fix column order in database
......@@ -133,8 +133,6 @@ MainWindow::MainWindow(QWidget *parent) :
model->setHeaderData(5, Qt::Horizontal, "Pris");
model->setHeaderData(6, Qt::Horizontal, "Till Salu?");
model->setEditStrategy(QSqlTableModel::OnFieldChange);
QObject::connect(
model, &QSqlTableModel::dataChanged,
this, &MainWindow::on_productModel_dataChanged
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment