You are not logged in.


Thursday, August 23rd 2012, 5:22pm

Default searching for QTableView


I have a QSqlTableModel displayed in a QTableView. I have the Edittriggers set to AnyKeyPressed but that only seems to work for characters and numbers. When a cell is selected and then I click SHIFT+N or any character it just searches that column for the 1st (from the top) cell with that character in it. Is there a way to disable this? I tried setting the edit trigger to AllEditTriggers which works for existing records but when I add a new record the 1st cell is selected and the same thing happens when SHIFT+char is pressed also I don't really want to use AllEditTriggers if possible.


Thursday, August 23rd 2012, 8:47pm

Solved this by just using MyTableView->edit(index) when I add a new record.