Display the popup in the correct place

The popup should be shown beneath the QLineEdit. this code here
is shamelessy stolen from the QCompleter source code because I
really didn't want to rethink the correct way of doing this.

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:08:58 -03:00 committed by Dirk Hohndel
parent 012e8ccb46
commit c4c7e7a7f4
2 changed files with 54 additions and 5 deletions

View file

@ -93,6 +93,9 @@ public:
DiveLocationLineEdit(QWidget *parent =0 );
void refreshDiveSiteCache();
void setTemporaryDiveSiteName(const QString& s);
protected:
void keyPressEvent(QKeyEvent *ev);
void showPopup();
private:
DiveLocationFilterProxyModel *proxy;
DiveLocationModel *model;