[Qt-interest] QFileDialog and UNIX device nodes

Srdjan Todorovic todorovic.s at googlemail.com
Thu Jul 22 09:56:12 CEST 2010


On 22 July 2010 08:07, Konrad Rosenbaum <konrad at silmor.de> wrote:
> On Wednesday 21 July 2010, Jeffery MacEachern wrote:
>> As part of the connection
>> process, the user is presented with a QFIleDialog to select the serial
>> port that the device is connected to.  We are currently using a filter
>> of "*".  Is there a smarter way to do this on Linux/UNIX/OS X?
>
> On most Unixes serial devices will match tty*.
>
> On Linux for example ttyS* are the normal serial ports, ttyACM* are USB
> attached serial devices (eg. UMTS modems).

But that's really only a convention. I think you can even do:

  mknod /dev/didyouhearthiscoolstory   c 4 64

which should create a new character device node that will be
equivalent to /dev/ttyS0 - the first UART serial port (this is all on
Linux).

So I guess a file dialog that could filter based on major and minor
numbers of device nodes would be neat - but it's probably not portable
on non-UNIX systems.

Does anyone know of such a dialog?

Srdjan




More information about the Qt-interest-old mailing list