How can I catch Shift + Ctrl key?
Hi. I want to catch Shift + Ctrl key in QTabWidget
- {
- {
- {
- switchToPreviousTab();
- return;
- }
- else
- {
- switchToNextTab();
- return;
- }
- }
- }
Why this code doesn’t work? Ctrl + Shift + Tab is working without my code, but I need to change behaviour. How can I fix that problem?
2 replies
Have you stepped through this and checked the value of ‘modifier’; is it possible your switch tab functions are the culprits?
The docs also mention: “Warning: This function cannot always be trusted. The user can confuse it by pressing both Shift keys simultaneously and releasing one of them, for example.”
update: Also, be sure you accept or ignore the event whether or not you handled it.
You must log in to post a reply. Not a member yet? Register here!
