QtableView + validation + cell color change behavior
Unsolved
General and Desktop
-
Hello and thanks for taking the time,
I have a QTableView that uses a derivative of QItemDelegate to validate the input to the cells. At the same time, the table allows the opening of a context-menu by right clicking on a cell to change its color. Unfortunately however, this combination's behavior is not ideal right now: when I right click a cell and change its color by clicking on an item in the context-menu, the focus is set to the cell (i.e. it is editable as if I left-clicked on it) until I left-click on an adjacent cell, after which the cell is painted properly (and the latest clicked-on cell gets the focus).
Any idea how to address this would be much appreciated!