views:

129

answers:

0

Hello, I have a QCompleter that is forcing my users to hit enter twice when the popup is visible but is not used to select an item. The model for the QComboBox associated to the completed is used as the model for the completer.

 QCompleter *completer = new QCompleter(this);
 completer->setCaseSensitivity(Qt::CaseInsensitive);
 completer->setCompletionMode(QCompleter::PopupCompletion);
 completer->setModel(this->ui->comboBox->model());
 this->ui->comboBox->setCompleter(completer);

As the user enters items the list of possible completions grows. If they start to type short completions (e.g. "dir") where there are longer completions available, and they hit without choosing anything from the popup (i.e. neither activated, highlited, or indexchanged get fired) then they are forces to hit enter again to process the text they entered. Is there a simple way around this?

thanks