I have a QLineEdit for the user to enter a path and I have a QCompleter with a QDirModel which works great for auto-completion. Here's how thats done...

Qt Code:
  1. QLineEdit * file_lineedit = new QLineEdit(this);
  2. QDirModel * file_model = new QDirModel();
  3. QCompleter * file_completer = new QCompleter(file_model, this);
  4. file_lineedit->setCompleter(file_completer);
To copy to clipboard, switch view to plain text mode 
The default completion mode is QCompleter::PopupCompletion. But I would very much like it to have PopupCompletion and InlineCompletion. That way you get a drop down of the completion possibilities but it auto selects the closest completion. Any ideas?

As far as I can tell
Qt Code:
  1. completer->setCompletionMode(QCompleter::PopupCompletion | QCompleter::InlineCompletion)
To copy to clipboard, switch view to plain text mode 
doesnt work