I am using QT4 (4.2.1) with python 2.4 on CentOS.
I assigned QAction with shortcuts to my menu and disable/enable them accordingly. I have event handlers assigned to the triggered event for the actions. Everything works as expected except that the shortcuts trigger the events for disabled actions. For example, I have a Delete QAction with Del shortcut. I see the disabled Delete menu option but if I hit the Del key my triggered event handler gets called. This is kind of odd…
Is this by design or I am doing something wrong?
As a workaround I am now checking QAction isEnabled() in each action event handler but is there a way to not get triggered events for disabled actions?
Thank you very much for your help,
Leo
This behaves fine with Qt 4.8.5, and as far as I can tell from the source it should work with versions as old as Qt 4.5.
Try upgrading Qt to a reasonably recent version, or at least try your code on a more modern version.