Q:

QTableView clicked.connect() keyboard scroll equivalent in PyQt5

I have the following method in some ui i'm working on:
def get_employees(self):
    self.employee_frame = pd.read_sql_query('SELECT * FROM emp_data', self.connection)
    model = PandasModel(self.employee_frame.drop('image', axis=1))
    self.employee_data.setModel(model)
    self.employee_data.setSelectionBehavior(QAbstractItemView.SelectRows)
    self.employee_data.clicked.connect(self.display_selected)

Whenever I click on a table row in the right part of the screen, details in the left part are displayed and changed according to the selected row. What is the equivalent that makes the details change also by scrolling up and down the QTableView rows?
Here's how it looks:

A:

You must use the currentChanged signal of the QItemSelectionModel associated with the QTableView and the model (with this change it is not necessary to use the clicked signal):
def get_employees(self):
    self.employee_frame = pd.read_sql_query('SELECT * FROM emp_data', self.connection)
    model = PandasModel(self.employee_frame.drop('image', axis=1))
    self.employee_data.setModel(model)
    self.employee_data.setSelectionBehavior(QAbstractItemView.SelectRows)
    self.employee_data.selectionModel().currentChanged.connect(self.display_selected)

