Start to handle keypresses

Keypress management is one of the main functions of the completer, so we
must create an event filter and hook things up properly.
key esq / enter should close the popup (and not leave us with a popup open
and no way to close it - it breaks X)

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2015-09-21 16:51:39 -03:00 committed by Dirk Hohndel
parent c4c7e7a7f4
commit fdd28fddf2
2 changed files with 42 additions and 5 deletions

View file

@ -93,6 +93,7 @@ public:
DiveLocationLineEdit(QWidget *parent =0 );
void refreshDiveSiteCache();
void setTemporaryDiveSiteName(const QString& s);
bool eventFilter(QObject*, QEvent*);
protected:
void keyPressEvent(QKeyEvent *ev);
void showPopup();