Help using QCompleter with QFileSystemModel
I want to adapt the 'customcompleter' example (http://doc.qt.digia.com/qt/tools-customcompleter.html) to use a file system completer instead of reading out of the word list.
The docs say you can use a QFileSystemModel using the following (http://doc.qt.digia.com/qt/qcompleter.html):
@ QCompleter *completer = new QCompleter(this);
[Typo, btw.] So in the example, I tried changing:
@ QFileSystemModel * model = new QFileSystemModel(completer);
(I also tried it without the setRootPath call, passing in "." and "/", and with QDirModel instead.)
It no longer works: the completion window does not appear either on its own or when called with ctrl-E. What am I doing wrong?
Oh, I guess I should say that I'm using Qt 4.8.1 on Linux.