// QSpinBox* mySpinBox;
//QSqlQueryModel *model;
// int rowIndex,colIndex;
QObject::connect(mySpinBox, static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged),[model,rowIndex,colIndex](int val)->void{
model->setValue(model->index(rowIndex,colIndex),val);
});