Certain widgets will allow me to do:
self.widget.clicked.connect(on_click)
but do:
self.widget.keyPressEvent.connect(on_key)
cannot say that the object does not have the "connect" attribute.
I know that subclassing the widget's classification and keyPressEvent method will allow me to respond to the event. But how can I .connect() on a keyboard event after that or, if not to say, say, from a user's context?
source share