PDA

View Full Version : Serial Programming with QT



ape
20th December 2007, 14:40
Hi again,

i guess thats not really possible with QT but let me ask, maybe i just havent found the matching keywords.

Is it possible to check the host system (which runs my application) for existing serial-interfaces (like Com1, Com2, etc...)

My test-application has a QComboBox atm with static entries.
Basicly it would make more sense to check at application-start for existing interfaces
and in the next step feed those resources into my QComboBox.

The only matching keyword during my search in this forum was: QextSerialPort

Last time i messed around with that topic was with LabView, which was kinda easy...but i do not want to compare those worlds in any way.

Any hints ?
Best regards
ape

marcel
20th December 2007, 14:41
Go with QextSerialPort. It's the easiest solution.

high_flyer
21st December 2007, 10:37
Is it possible to check the host system (which runs my application) for existing serial-interfaces (like Com1, Com2, etc...)
As marcel mentioned, QextSerialPort is recommended.
Then you can just try the open the port, if it gets open, you know it exists.
If not, it *might* still exist, but I don't know how your application could know about it then.

calhal
24th December 2007, 20:33
Is it possible to check the host system (which runs my application) for existing serial-interfaces (like Com1, Com2, etc...)
qextserialport-1.2win-alpha has QextSerialEnumerator class, which provides list of ports available in the system (it worked for me under Windows, unfortunetely not under Linux). Still this is unstable release. While using it I had some problems with port opening.
You can check if it works for you, but if I were you I'd wait till it is stable ;)
Oh..I didn't checked svn snapshot, maybe it will work