Double clicking a table now opens a CRUD page for that table however data cannot be changed yet thought it will display an editbox.

This commit is contained in:
eelke 2018-01-09 20:39:43 +01:00
parent abd4020ddf
commit 2ba27178a2
13 changed files with 288 additions and 33 deletions

View file

@ -7,7 +7,6 @@ ParamListModel::ParamListModel(QObject *parent)
QVariant ParamListModel::headerData(int section, Qt::Orientation orientation, int role) const
{
// FIXME: Implement me!
QVariant result;
if (orientation == Qt::Horizontal) {
if (role == Qt::DisplayRole) {
@ -56,7 +55,7 @@ QVariant ParamListModel::data(const QModelIndex &index, int role) const
if (index.isValid()) {
int row = index.row();
int col = index.column();
if (role == Qt::DisplayRole) {
if (role == Qt::DisplayRole || role == Qt::EditRole) {
const auto& record = m_paramList[row];
switch (col) {
case ColValue: // value column