0

Multi edit cell only modifies current cell rather then all selected cell | Qt table

QT table cell editing behaviour I have table in QT using C++. I need to have : 1. Single cell should allow editing either if clicked on selected cell or double clicked on cell 2. Multi-editing is allowed when either double clicked on cell or clicked on any one of the selected cell How to achieve this? I have used SetSelectionMode(MultiSelection) and SetSelectionBehavior(SelectItems) along with SetEditTriggers(SelectedClicked | DoubleClick). This works well for single selection i.e. I am able to modify single cell value either by double click or by doing selection on selected cell. However, multi selection happens ok with control key but edit fails for other cells apart from current cells . It means all cells are not modified, but only current cell modified as selectedindexes gives only current cell index. Am I doing anything wrong or something additional is missing?

21st Apr 2025, 11:02 AM
Ketan Lalcheta
Ketan Lalcheta - avatar
1 Resposta
+ 2
Ketan Lalcheta Show your code and we'll be able to help but for a quick reference: Qt's default editing behavior only supports editing one cell at a time, even if multiple cells are selected. To implement multi-cell editing , you need to implement and customise it yourself
23rd Apr 2025, 6:20 AM
~Moonscript~
~Moonscript~ - avatar