2
votes

I have QListwidget object, and I'm using it's signals such as: itemDoubleClicked,itemClicked...

is there a signal for when I use the up/down arrows to go over the QListwidget items? In general, I want that everytime an item is chosen (through a click/doubleClick/ up&down arrows) to run a function.

thanks

2

2 Answers

3
votes

I think the standard should be

QListWidget::itemSelectionChanged()

and in your function use:

QListWidget::selectedItems ()

to get the current selection.

0
votes

you can do it by installing and implementing an eventFilter. You can filter every event you waant. Even mouse or keyboard. So you would like to read a little of documentation : Docs

Remember once you have defined an eventFilter you have to install it with installEventFilter : installEventFilter