m_pModel->setEditStrategy(QSqlTableModel::OnManualSubmit)
//New row. m_pModel->insertRows(0, 1); //date_time index = m_pModel->index(0, 0); m_pModel->setData(index, cur_date_time); //data_unit. index = m_pModel->index(0, 1); m_pModel->setData(index, data_unit);
m_pModel->select()
m_pModel->insertRows(0, 1)