mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Show the correct delegate on the completer
For some reason the completer wouldn't show the delegate if the line order of the code was different. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
ff6bf497c8
commit
eff22c28db
1 changed files with 2 additions and 10 deletions
|
@ -59,21 +59,13 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent),
|
|||
closeMessage();
|
||||
|
||||
QCompleter *completer = new QCompleter();
|
||||
QListView *completerListview = new QListView();
|
||||
completer->setPopup(completerListview);
|
||||
completer->setModel(LocationInformationModel::instance());
|
||||
completer->setCompletionColumn(LocationInformationModel::NAME);
|
||||
completer->setCompletionRole(Qt::DisplayRole);
|
||||
completer->setCompletionMode(QCompleter::PopupCompletion);
|
||||
completer->setCaseSensitivity(Qt::CaseInsensitive);
|
||||
|
||||
QListView *completerListview = new QListView();
|
||||
completerListview->setItemDelegate(new LocationFilterDelegate());
|
||||
completer->setPopup(completerListview);
|
||||
|
||||
QListView *completerListView2 = new QListView();
|
||||
completerListView2->setItemDelegate(new LocationFilterDelegate());
|
||||
completerListView2->setModel(LocationInformationModel::instance());
|
||||
completerListView2->setModelColumn(1);
|
||||
completerListView2->show();
|
||||
|
||||
ui.location->setCompleter(completer);
|
||||
connect(ui.addDiveSite, SIGNAL(clicked()), this, SLOT(showDiveSiteSimpleEdit()));
|
||||
|
|
Loading…
Add table
Reference in a new issue