[Qt-interest] QFileDialog and UNIX device nodes

Jeffery MacEachern j.maceachern at gmail.com
Fri Jul 23 21:17:46 CEST 2010


Excellent - libqextserialport is exactly what we needed.  That
simplifies things greatly.

 - Jeffery MacEachern



On Thu, Jul 22, 2010 at 01:20, Jeffery MacEachern
<j.maceachern at gmail.com> wrote:
> On Thu, Jul 22, 2010 at 00:56, Srdjan Todorovic
> <todorovic.s at googlemail.com> wrote:
>> 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.
>
> That's sort of what I was thinking of, although I think I like Harry's
> suggestion; the QFileDialog is actually overkill if we merely need to
> select between one of (presumably a small number of) serial ports, and
> if the classes mentioned are portable to other platforms, then all the
> better.  I will take a look at that.
>
>> Does anyone know of such a dialog?
>>
>> Srdjan
>>
>> _______________________________________________
>> Qt-interest mailing list
>> Qt-interest at trolltech.com
>> http://lists.trolltech.com/mailman/listinfo/qt-interest
>>
>




More information about the Qt-interest-old mailing list