From ce03d5d4687f7d789ddfacdd51c4281eb9193487 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Fri, 2 Apr 2010 22:10:24 +0200 Subject: hide suggestions on ESC key --- src/urlbar/urlbar.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/urlbar') diff --git a/src/urlbar/urlbar.cpp b/src/urlbar/urlbar.cpp index a04d6534..0dc91a1e 100644 --- a/src/urlbar/urlbar.cpp +++ b/src/urlbar/urlbar.cpp @@ -232,6 +232,12 @@ QSize UrlBar::sizeHint() const void UrlBar::keyPressEvent(QKeyEvent *event) { + if(event->key() == Qt::Key_Escape) + { + m_box->hide(); + return; + } + // this handles the Modifiers + Return key combinations QString currentText = m_lineEdit->text().trimmed(); if ((event->key() == Qt::Key_Enter || event->key() == Qt::Key_Return) -- cgit v1.2.1