How to prevent moving cell (QtableView) if the data is invalid?

  • Hi,
    I used a QValidator to check the data in a table cell, and if invalid data entered a message popup but after that table column moved to right (default tableView behavior). How to prevent leaving the cell if the data is invalid?
    I tried to get currentIndex().column(); to get the column number, but it always returns -1

  • Have you tried just using currentIndex() without asking for the column, and just getting the complete reference to the cell in question?

  • [solved]

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.