mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-12-19 03:54:07 +00:00
b5349478cf
The next commit will add `.git-blame-ignore-revs` https://docs.github.com/en/repositories/working-with-files/using-files/viewing-a-file#ignore-commits-in-the-blame-view
23 lines
455 B
C++
23 lines
455 B
C++
#include "mruqmenu.hh"
|
|
#include <QKeyEvent>
|
|
|
|
MRUQMenu::MRUQMenu( const QString title, QWidget * parent ):
|
|
QMenu( title, parent )
|
|
{
|
|
}
|
|
|
|
void MRUQMenu::keyReleaseEvent( QKeyEvent * kev )
|
|
{
|
|
if ( kev->key() == Qt::Key_Control && actions().size() > 1 ) {
|
|
QAction * act = activeAction();
|
|
if ( act == nullptr ) {
|
|
act = actions().at( 1 );
|
|
}
|
|
emit requestTabChange( act->data().toInt() );
|
|
hide();
|
|
}
|
|
else {
|
|
kev->ignore();
|
|
}
|
|
};
|