Solved QCompleter with QFileSystemModel
-
Hi,
I have tested QCompleter example.
http://doc.qt.io/qt-5/qtwidgets-tools-completer-example.html
When I type c:\ it does not display the directory list under c:\.
However, if I delete "\" and type "\" again, it shows the directory list under c:\.
Is it a bug or can I do in some other ways? -
@samdol
Seems like using QDirModel instead of QFileSystemModel is the workaround.
completer->setModel(new QDirModel(completer));
according to
https://bugreports.qt.io/browse/QTBUG-38014