what event should I implement in order to catch QKeySequence::Delete
I went through all posts here and tried couple of suggestions, and it works on Windows, but it does not work on Mac. The way I understood from documentation, QKeySequence::Delete key represents different bindings depends on OS. Then why it works only on Windows. Please, help me to solve this mystery :D.
Re: what event should I implement in order to catch QKeySequence::Delete
Hard to say without seeing the code, but you probably want to catch Qt::Key_Delete and not QKeySequence::Delete.
Re: what event should I implement in order to catch QKeySequence::Delete
See QKeyEvent::matches() or use QShortcut instead of catching events.
Re: what event should I implement in order to catch QKeySequence::Delete
i like you suggestion about QShortcut. I'll try. Thanks a lot.
Re: what event should I implement in order to catch QKeySequence::Delete
First of all look up into ur code if you are any how capturing Delete key. Check if you have used :
setShortcut(tr("Delete"));
any where in your code.
As this will capture Delete key on application level prevent the KeyPressEvent to capture Qt::Key_Delete. I have also faced the similar problem. The moment i commented this piece of line KeyPressEvent captured the Qt::Key_Delete. Thiswas the only possible way we were not able to capture key Qt::Key_Delete with keypressevent.