On 2009-08-21 10:25:05 -0400, Mike Jackson <imikejackson@xxxxxxxxx> said:
> I have the following bit of code:
> QCompleter *completer = new QCompleter(this);
> QDirModel* model = new QDirModel(completer);
> QStringList nameFilters;
> nameFilters << "*.mxa" << "*.h5" << "*.hdf5";
> model->setFilter(QDir::AllDirs | QDir::Drives | QDir::NoDotAndDotDot |
> // mxaFile is a QLineEdit
> The problem is that none of my External disk drives are listed. They
> are mounted in /Volumes on OS X. The /Volumes isn't even listed as a
> possible completion either.
> Is there a way to have QDirModel list the all the mounted Disk Drives on OS X?
> Mike Jackson mike.jackson@xxxxxxxxxxxxxx
> BlueQuartz Software www.bluequartz.net
> Principal Software Engineer Dayton, Ohio
Just to follow up a bit. I had to add "QDir::Hidden" to the list of
filters to be able to see the mounted drives. Except now I see _all_
the hidden directories. Probably have to subclass QDirModel to
customize it to my liking.
Qt-interest mailing list