I have a QSqlTableModel and a QTableView.
Trying to make just one column not editable.
Found several examples in previous posts, but nothing is making sense to me as how to accomplish this in my code.
The signal/slot for when a cell is clicked is working ok.
Here is what I have so far:
Qt Code:
qDebug() << "view has been clicked!"; // good so far int col = index.column(); int row = index.row(); qDebug() << "clicked column is " << col; // got the column ok if (col != 0) { // it should be ok to edit // now what??? } }To copy to clipboard, switch view to plain text mode
Am I on the wrong track or is this simple to finish?
Bookmarks