Important: Please read the Qt Code of Conduct -

Strange behaviour of QStyledItemDelegate

  • 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?

Log in to reply