Offer an option to just complete the text

Make the kids fight no more.

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-07-14 18:43:47 -03:00 committed by Dirk Hohndel
parent 4dfb39cc49
commit cd3f10d5ad
4 changed files with 73 additions and 9 deletions

View file

@ -61,10 +61,11 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent),
QCompleter *completer = new QCompleter();
QListView *completerListview = new QListView();
LocationInformationModel::instance()->setFirstRowTextField(ui.location);
completer->setPopup(completerListview);
completer->setModel(LocationInformationModel::instance());
completer->setCompletionColumn(LocationInformationModel::NAME);
completer->setCompletionRole(Qt::DisplayRole);
completer->setCaseSensitivity(Qt::CaseInsensitive);
completerListview->setItemDelegate(new LocationFilterDelegate());