Hey.
I’ve got a QListView, and so far I’ve only figured out how to use the signals that are already given. I can’t find any signals for when the enter key was pressed on an item in the list (QStandardListItem). Can’t seem to find any keyPressedEvents either.
Is it possible to “hook up” QListView to a event just like that? How? 🙂
Thanks
Use event filtering: e.g. in the list container’s setupUi, do
and then define the filter API function in that container:
Note that
InsertParagraphSeparatoris the logical event bound to the Enter key. You can use alternative ways of catching the event, but what I have shown should point you in the right direction.