Setting Focus On Table Delegate's Item With Single Click
-
wrote on 11 Nov 2011, 14:37 last edited by
I have a QTreeView. One of the columns in the QTreeView uses a QTableView as it's delegate for editing. For the most part it works. The only issue is that I have to click the treeview so that the table view editor is created. Once the table is created the focus falls on item(0,0). So then I have to click again to the table item (which, from a user point of view, was already clicked).
I don't know if I need to install an event filter, manually send an event or what. Any help would be appreciated.
-
wrote on 15 Nov 2011, 13:48 last edited by
For the record, I did get this to work. What I did might be heretical or horrible. In a nutshell, I reimplemented editorEvent() and eventFilter() to deal with the mouse click position and set the proper model index for the table view delegate.
1/2