I'm trying to make a trigger for the Ok button in my application The current code I tried was this:
self.okPushButton.setShortcut("ctrl+Enter")
However, it doesn't work, which kind of makes sense. I tried looking up some key sequences here, but, again, a similar issue if I try with the shift or alt keys.
How can I trigger the OkButton with ctrl+Enter
According to the docs:
That is to say when you set
Enterwe refer to the key that is on the numeric keypad.But if you want to use the default enter you must use
Return.