[Interest] Bug with QCompleter/QFileSystemModel ?

Jeremy jswigart at gmail.com
Mon Apr 30 19:43:15 CEST 2012


I have a QFileSystemModel that I'm tinkering with. I'm trying to hook up a
QCompleter to the file system model to support auto completion of a file
path. There appears to be a problem though that the QCompleter is trying to
auto complete the path from the root drives, and not with the path
reflected by a previous call to setRootIndex. For example, I set the root
index to a sub folder c:\test\folder. I would expect the completer to pop
up options for subdirectories or folders below that, but the completer
appears to be using data from the QFileSystemModel without the root index
considered, so the completer shows the list of drives first. I would think
that the completer would base its source on the root index. Wouldn't that
make the most sense? Is this a bug? What's the recommended workaround?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20120430/14f545d8/attachment.html>


More information about the Interest mailing list