From 896bd350bed568698963619bf88ab84f2215b298 Mon Sep 17 00:00:00 2001 From: Abs62 Date: Wed, 13 Jul 2022 17:31:57 +0300 Subject: [PATCH] Handle Ctrl+Tab/Ctrl+Shift+Tab in translate line as tabs switch --- mainwindow.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/mainwindow.cc b/mainwindow.cc index f06508cd..b7e9e6bb 100644 --- a/mainwindow.cc +++ b/mainwindow.cc @@ -2541,6 +2541,11 @@ bool MainWindow::eventFilter( QObject * obj, QEvent * ev ) ctrlTabPressed(); return true; } + else if( obj == translateLine ) + { + QApplication::sendEvent( ui.tabWidget, ev ); + return true; + } return false; } } @@ -2560,6 +2565,12 @@ bool MainWindow::eventFilter( QObject * obj, QEvent * ev ) return true; } } + + if( keyEvent->matches( QKeySequence::PreviousChild ) ) // Handle only Ctrl+Shist+Tab because Ctrl+Tab was already handled before + { + QApplication::sendEvent( ui.tabWidget, ev ); + return true; + } } if ( ev->type() == QEvent::FocusIn ) {