Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Strange behaviour of QStyledItemDelegate
yura-vel last edited by
First of all I should say that I do not use moc in my project, so can't to use signal and slots.
To use QComboBox behaviour in the QTableWidget I implemented a custom delegate. It works fine except one bizarre behaviour: if changed the value in the last column in the table, after hiding the widget (combobox), the selection in the table switches to the next row. The same delegate works fine in the one of middle column (the selection is not changed).
The reason of changing selection in the table, is invoking hide() for the combobox showed by the delegate. because after invoking this method, the signal QTableWidget::itemSelectionChanged is emitted.
Tell me please: why hide() leads to switching selection?