Hello,

I am trying to understand QT 4.6 model/view architecture, so I decided to make a simple bookkeeping application. I've looked over and played with the QT examples but they don't handle row entry in the way I'd like to do it.

Basically, I want a table that starts off with one empty row (columns in this case aren't relevant). If you edit that empty row and then you hit enter, it will attempt to validate the row. If validation succeeds, that row will be added to your data set and a new empty row will appear in the table beneath it. If validation fails, that rows background color will be set to red.

In the examples I've looked at, adding a row was done through a button, but I want my application to be more like an excel spreadsheet (in that I've always got an empty row that is used to add entries.)

Any suggestions/examples on how to accomplish this? I am using QTableView and subclass of QAbstractTableModel, and I cant seem to figure it out.

Thanks.