From 47265b274693ba0e5bd4ecf2575ea132cbdf53a5 Mon Sep 17 00:00:00 2001 From: wsgfz Date: Thu, 29 May 2014 17:19:28 +0800 Subject: [PATCH] use the "enter" key to do the search Just connect the "returnPress" SIGNAL of the search QLineEdit to the "clicked" SIGNAL of the find Button. Make the search action more smoothly. :) --- redis-desktop-manager/source/application.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/redis-desktop-manager/source/application.cpp b/redis-desktop-manager/source/application.cpp index 7bcdb695..791aa19e 100644 --- a/redis-desktop-manager/source/application.cpp +++ b/redis-desktop-manager/source/application.cpp @@ -89,6 +89,8 @@ void MainWin::initFilter() { connect(ui.pbFindFilter, SIGNAL(clicked()), SLOT(OnSetFilter())); connect(ui.pbClearFilter, SIGNAL(clicked()), SLOT(OnClearFilter())); + connect(ui.leKeySearchPattern, SIGNAL(returnPressed()), ui.pbFindFilter, + SIGNAL(clicked()), Qt::UniqueConnection); } void MainWin::initSystemConsole() @@ -438,4 +440,4 @@ void MainWin::OnUIUnlock() void MainWin::OnStatusMessage(QString message) { statusBar()->showMessage(message); -} \ No newline at end of file +}