Important: Please read the Qt Code of Conduct -

How to deny change in QAbstractItemView::currentChanged()

  • When I receive the currentChanged signal there are instances where I do not want to allow the user to switch selections (for example when they have modified something without saving).

    How do I disallow this? Tried doing a selectionModel->select(previous, QItemSelectionModel.Select) without any luck.


  • Lifetime Qt Champion


    What usually happens is that the modification saving is done when the cell loses focus. Do you have a special editor ?

Log in to reply