PDA

View Full Version : making GUI for serial port communication using qt creator



jerkymotion
7th March 2011, 10:52
hi I am using windows 7
I am beginner to qt
I want to make GUI for serial communication with serial port ......I have completely no idea how to make it.....
please provide me detail information about this :)

littletux
7th March 2011, 11:26
Hi,

you might want to have a look at http://code.google.com/p/qextserialport/
This is a Qt extension library to access the serial port on Windows and Unix.

Basically your steps will be the same as with any Qt application: You can define the UI with QtCreator, and then implement the behavior in C++ by connecting signals to slots - the qextserialport library provides a couple of signals which you can use to react on data received from the serial port. In any case, if you are really new to Qt, you should definitely start with working through one of the many tutorials available on the net :) - start with implementing a small demo application, and add the serial communication once you are more comfortable with Qt.

If you have questions specifically on qextserialport, I might be able to help - I am using it in a current project.

Thanks,

Andreas

jerkymotion
7th March 2011, 14:06
I would like to start from very basics.......how to include library for serial port .......
First of all I would like to start with how to include the external serial port class...(in .pro file) and basic commands for serial port...
then after that i would like to write some data in serial port with help of GUI.....
please help

kuzulis
7th March 2011, 15:06
jerkymotion,

If you do not mind a license - something I would advise you to use instead of QextSerialPort - QSerialDevice:

http://gitorious.org/qserialdevice/qserialdevice/trees/master

QextSerialPort more than a year is not supported and not updated.
QSerialDevice - a modern library and have more opportunities, well-documented.
For example, the construction of GUI in the repository of source code is a simple example in the: /test/guiapp.

PS: My advice - forget about QextSerialPort. :)

jerkymotion
7th March 2011, 17:45
ok thanks
I don't mind using any liibrary but it must be simple to link or install ......for a people of my level ......
please help me in linking libraries and class of serial port or whatever....because I've no Idea what so ever:confused::confused:


I would be glad to recieve help from you please help me how to build the serial port class in qt creator ...in details..

squidge
7th March 2011, 18:57
The restriction of GPL for QSerialDevice kills it for me on many projects. Luckily, there's also QSerialPort, which is released under LGPL -
http://www.inbiza.com/labs/2010/10/21/high-performance-qt-serial-port-library/
http://gitorious.org/inbiza-labs/qserialport

schnitzel
7th March 2011, 20:54
I would like to start from very basics.......how to include library for serial port .......
First of all I would like to start with how to include the external serial port class...(in .pro file) and basic commands for serial port...
then after that i would like to write some data in serial port with help of GUI.....
please help

have you looked at the examples that come with qextserialport? They show exactly what you need.

jerkymotion
8th March 2011, 07:52
I have no idea even how to begin.....I don't know how to link the libraries of serial port ,,,,,,,
Please explain it in details...step by step....
only I could managed to do is to install qt creator sdk in windows 7:(

Added after 1 4 minutes:

I wanted to make GUI application which can simply write something in serial port...by just clicking a single button.....

marcvanriet
8th March 2011, 21:54
It would be helpfull for us to know how much programming experience you have : how many years of programming experience in general, and how many years of experience with C/C++.

jerkymotion
9th March 2011, 15:20
I have not much experience in C++ programming..not even a year...:(
For serial port communication in qt I have downloaded the qextserial which was a ZIP file....
I extracted in my C: and searched all the sites how to do the task.....
all those explain in this way:::::The normal procedure for installing this library is to download and compile it (at a DOS prompt, type qmake and then make). This will compile the library and generate a dll.
Now I have no idea how the DOS prompt is related to this and what is qmake ??? and how to compile library and generate .dll files
please help:o

jerkymotion
9th March 2011, 22:03
Finally I am able to create GUI for serial communication....
Now I am able to write data in serial port ....but still I am not able to read from serial port in my GUI....
please help if u feel comfortable

schnitzel
9th March 2011, 22:13
Finally I am able to create GUI for serial communication....
Now I am able to write data in serial port ....but still I am not able to read from serial port in my GUI....
please help if u feel comfortable

did you look at the qextserialport event example?
perhaps the folks over at qextserialport forum can answer any specific questions regarding qextserialport usage.

squidge
9th March 2011, 23:37
Finally I am able to create GUI for serial communication....
Now I am able to write data in serial port ....but still I am not able to read from serial port in my GUI....
please help if u feel comfortablePlease post your code, maybe you don't use signals and slots correctly. Please remember to use code tags.

Nirmala H
8th August 2012, 08:26
Finally I am able to create GUI for serial communication....
Now I am able to write data in serial port ....but still I am not able to read from serial port in my GUI....
please help if u feel comfortable

Hi jerkymotion,

Even am very new to this Qt Creator want to establish serial communication (if you press button data to be transferred to serial port)..so please share your code..it will help us..