[email protected]
[Top] [All Lists]

Re: [Qt-interest] QCompleter with QDirModel on OS X can not reach Extern

Subject: Re: [Qt-interest] QCompleter with QDirModel on OS X can not reach External Disk Drives?
From: Mike Jackson
Date: Fri, 21 Aug 2009 10:41:23 -0400
On 2009-08-21 10:25:05 -0400, Mike Jackson <[email protected]> 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->setNameFilters(nameFilters);
> model->setFilter(QDir::AllDirs | QDir::Drives | QDir::NoDotAndDotDot | 
> QDir::System);
> completer->setModel(model);
> mxaFile->setCompleter(completer);
> // 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?
> Thanks
> _________________________________________________________
> Mike Jackson                  [email protected]
> 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
[email protected]

<Prev in Thread] Current Thread [Next in Thread>