PDA

View Full Version : Browse /dev/ using QFileDialog on Mac OS X



blueillusion
22nd July 2010, 21:41
Hi all,

I'm using Qt 4.6.3 on Mac OS X
I'm trying to open a character device that resides in /dev
To do this, i just wanted to use a regular call to QFileDialog::getOpenFileName()
I also set the type of files to open to be *, so any file.

The call i make is:


fileName = QFileDialog::getOpenFileName(this, tr("Open Device"), "/dev/", tr("Device (*)"));

This code seems to work perfectly on linux, however on Mac OS X i see no files when i make the call above.
Is there anyway to make QFileDialog show the files listed in /dev on OS X? If not, do you know of an elegant workaround?

Thank you