PDA

View Full Version : QToolBar grabs SPACE and can't pass space to its parent to create access keys



ricardo
26th July 2009, 13:24
Hi friends!

I'm doing a level editor (similar to corel draw, with a QToolBar with different tools like hand, cursor, rectangle...). I'd like that pressing C key, cursor is selected, no problem if I rewrite keyPressedEvent, but I want to select my 'hand' tool when pressing SPACE, it seems QToolBar grabs this key.

Any suggestion?

BTW, I'm using QActionGroup in order to have one and only one tool selected.

Thanks a lot for your help.

nish
26th July 2009, 15:08
you can put a eventFilter() to your mainWindow and pass the keyevent to any widget