PDA

View Full Version : Shorcuts for disabled QActions



Michiel
23rd May 2007, 16:09
I notice that even though a QAction is disabled, shortcut keys will still trigger them. This causes a few segfaults if I don't use extra checks in my code. Is this a bug, or is there an option I missed?

marcel
23rd May 2007, 16:17
Use QAction::blockSignals( true ) while the actions are disabled.
After that unblock them.

Regards

Michiel
23rd May 2007, 16:49
Works for me. Thanks! :)

I think a disabled action shouldn't send out signals by default, though.