Add hotkey for search-help

Add a new hotkey (CTRL+J) for toggling on/off
the search-help when you are in the search field
Fixes: #4100
This commit is contained in:
Kevin Jerebica 2024-04-15 21:51:45 +00:00 committed by Jonathan White
parent b5827aa25f
commit 9d714d5b4d
No known key found for this signature in database
GPG Key ID: 440FC65F2E0C6E01

View File

@ -21,6 +21,7 @@
#include <QKeyEvent>
#include <QMenu>
#include <QShortcut>
#include <QToolButton>
#include "core/SignalMultiplexer.h"
@ -43,6 +44,8 @@ SearchWidget::SearchWidget(QWidget* parent)
m_searchTimer->setSingleShot(true);
m_clearSearchTimer->setSingleShot(true);
new QShortcut(Qt::CTRL + Qt::Key_J, this, SLOT(toggleHelp()), nullptr, Qt::WidgetWithChildrenShortcut);
connect(m_ui->searchEdit, SIGNAL(textChanged(QString)), SLOT(startSearchTimer()));
connect(m_ui->helpIcon, SIGNAL(triggered()), SLOT(toggleHelp()));
connect(m_ui->searchIcon, SIGNAL(triggered()), SLOT(showSearchMenu()));