Open
Description
I'm not sure if this is a problem or it is just not clear to me how to do this. I'm trying to handle some keypresses to a QListWidget, but the problem I have is:
- Installing a virtual handler for keyPressEvent() “works”, but I can’t find a way to pass unhandled keypresses to or invoke the original (not-overridden) keyPressEvent function. That means I would have to duplicate the functionality of responding to all keys in lua. Is there a way to call QListWidget's original QListWidget::keyPressEvent() function from the widget:keyPressEvent() function that I add in lua?
- Alternatively, I can install an event filter and return false to indicate I didn’t handle the event which allows the original key press handler to maintain existing behavior- but the QEvent doesn’t seem to be modeled like other QT objects and I can’t figure out how to "cast" it to an actual keypress event, which seems to be the suggested method under C++. (eventFilter just gets a QEvent object, which under C++ has to be cast to the specific event type [QKeyEvent in this case] based on the event→type() function. ev:type() returns a string that says “KeyPress”, but how can I cast the event to an actual QKeyEvent in lua?
Any ideas? Is this possible already or are these functions not implemented yet?
Metadata
Metadata
Assignees
Labels
No labels