[Qt-interest] QFileDialog and UNIX device nodes

Harry Sfougaris hsfougaris at gmail.com
Thu Jul 22 09:42:39 CEST 2010


You might also want to look at the code in QExtSerialEnumerator (part of QExtSerialPort), which is also cross platform and gives you a QList of available serial ports (if you want to avoid QFileDialog).

Harry

On 22 Ιουλ 2010, at 10:33 π.μ., Jeffery MacEachern wrote:

> Thanks for the suggestion - I think that will work fine.
>  - Jeffery MacEachern
> 
> 
> 
> On Thu, Jul 22, 2010 at 00: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).
>> 
>> So if you want to stick with QFileDialog use tty* as filter (I haven't
>> tested whether that is even possible) and allow the user to use * instead.
>> Otherwise you'll have to implement your own dialog.
>> 
>> 
>> 
>>        Konrad
>> 
>> _______________________________________________
>> Qt-interest mailing list
>> Qt-interest at trolltech.com
>> http://lists.trolltech.com/mailman/listinfo/qt-interest
>> 
>> 
> 
> _______________________________________________
> 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