Has anyone considered using the QShortcut class to handle intercepting keyboard shortcuts? I had a table widget that was "stealing" the enter and tab keys from me and I got around the problem by using QShortCut as follows:
//Intercept the CTRL-TAB key from the table widget
QShortcut* shortcutTabKey;
shortcutTabKey = new QShortcut( QKeySequence( tr("Ctrl+TAB") ), m_tableWidget );
connect( shortcutTabKey, SIGNAL( activated() ), this, SLOT( OnTableShortCutTabKey() ) );
Hopefully this helps someone, as it seems easier than overriding QWidget::event.
Bookmarks