I'm attempting to implement a QCompleter with QFileSystemModel for a QLineEdit to assist the user in typing a local directory. My problem is that the QCompleter does not popup directly after typing in a new path. Here's my code before I go further into detail:

Qt Code:
  1. QCompleter *completer = new QCompleter(this);
  2. QFileSystemModel *fsModel = new QFileSystemModel(completer);
  3. fsModel->setRootPath("");
  4. completer->setModel(fsModel);
  5. QLineEdit *lineEdit = new QLineEdit(this);
  6. lineEdit->setCompleter(completer);
To copy to clipboard, switch view to plain text mode 

I've tested the above code sample using Qt 4.8.x and 5.0.x under Linux, Windows, and OS X and get the same behavior. Let's say the user wants to type in the path: /home/foo/bar. My results are this:

Qt Code:
  1. /home/foo // Contents of /home named foo* are displayed
  2. /home/foo/ // The QCompleter disappears entirely
To copy to clipboard, switch view to plain text mode 

At this point, if the user continues typing the path, or hits backspace and retypes the slash, the QCompleter pops up and works per normal until the next directory is entered whereupon the QCompleter again disappears.

Am I doing something obviously wrong here? Surely this is not the proper behavior; QDirModel works fine here, so I'm left wondering if it's threading related. Any pointers in the right directions are most welcome.