void setSelected_row(int value) { // QAbstractTableModel child auto updateRow = [this](int row){ if( row != -1 ) dataChanged( QAbstractTableModel::index( row, 0 ), QAbstractTableModel::index( row, columnCount() - 1 ) ); }; updateRow( m_selected_row ); m_selected_row= value; updateRow( m_selected_row); }