ИМХО, изврат.
Закольцуй фокус:
setTabOrder(a, b); // a to b
setTabOrder(b, c); // a to b to c
setTabOrder(c, d); // a to b to c to d
А потом переопредели:
bool eventFilter( QObject * object, QEvent * event )
{
QKeyEvent * ke = dynamic_cast < QKeyEvent > ( event );
if( ke )
{
if( ke->key() == QKeySequence( Qt::Key_Right ) )
{
QCoreApplication::sendEvent( object, new QFocusEvent( FocusOut, Qt::TabFocusReason ) );
return true;
}
else if( ke->key() == QKeySequence( Qt::Key_Left ) )
{
QCoreApplication::sendEvent( object, new QFocusEvent( FocusOut, Qt::BacktabFocusReason ) );
return true;
}
return QObject::eventFilter( object, event );
}