Which event intercepts the change of selection of the row (or element) in a QTableView?

52 Views Asked by At

I would like to know which event allows me to intercept the change of focus in a QTableView.

I tried with the keyPressEvent which allows me to intercept keys like Enter and Del, but does not allow me to intercept the keyboard arrows to move from one line to another.

In simple terms, what I'm trying to do is to change an image when I move from one element to another in the table view with keyboard arrows. I don't need to know how to change the image, but only what event to use to intercept, or otherwise perceive the change of selection from the table view.

I searched the official documentation. I read something about QItemSelectionModel, but I can't understand how to create this event. With keyPressEvent, I can't intercept the arrow up and down.

0

There are 0 best solutions below