I have QTableView
- mainTableView, in some cells of which I need to show another QTableView
- cellTableView.
Actually I found 2 ways:
1) Use pTableView->setIndexWidget
2) Use pTableView->openPersistentEditor
and implement an ItemDelegate
.
I have tried both ways and the problem is just the same. When I use an ItemDelegate
without openPersistentEditor
everything works good. Otherwise, as I understand, there is a problem with focus and with HeaderView
of the table in a cell.
I would like to solve the following problems:
- sometimes instead of a HeaderView of cellTableView, background of mainTableView is shown.
- When I press a key on a cell of cellTableView, editor for this cell is not opened but the pressed symbol is set to the cell (editor opened->editor receives "FocusOut" signal->editor is closed, pressed value is stored to the cell).
With space key or double click editing works good.
Someone could me explain how to solve this behavior?