View Full Version : what event should I implement in order to catch QKeySequence::Delete
yartov
27th June 2008, 21:56
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.
wysota
27th June 2008, 22:08
Hard to say without seeing the code, but you probably want to catch Qt::Key_Delete and not QKeySequence::Delete.
See QKeyEvent::matches() or use QShortcut instead of catching events.
yartov
1st July 2008, 04:41
i like you suggestion about QShortcut. I'll try. Thanks a lot.
naren82
5th December 2009, 10:33
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.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.