PDA

View Full Version : how to deal the different of qt3 and qt4 for the serial programming?



hiuao
19th March 2007, 06:41
I am using qt4.2.1,and I have to write serial programming.Recently,I find a kind person's serial program,anyone who need can download from the attachment of this letter and the next one,for I only can attatch 5 files one time.
My big problem is the qt4's IOdevice->readBlock(),and IOdevice->writeBlock() is not mathch the qt3's.I have changed the posix_qextserialport and qextserialbase functions,but the error is as the same as before.If someone knows the reason,can you be so kind to tell me?Thank you very much!:)

hiuao
19th March 2007, 06:49
Before this letter I attached 5 files,here is the rest.
Oh!dear!I tried for many times,but 2 files could't attatch.

wysota
19th March 2007, 10:51
Basically we know about QExtSerialPort :) If you want to attach multiple files, please create a single archive from them first (zip or tar.gz).

As for your question - QIODevice changed between Qt3 and Qt4, so you have to port QExtSerialPort to Qt4 to use it there.

high_flyer
19th March 2007, 14:33
QExtSerialPort is ported to Qt4, i can't remeber the url, but I am sure google will prove helpful.

hiuao
21st March 2007, 06:02
QExtSerialPort is ported to Qt4, i can't remeber the url, but I am sure google will prove helpful.
Thank you high_flyer!Basically,you give me the hope that QExtSerialPort can be used in Qt4.I hope I can resolve the problem as early as possible.
This time I attach all the files.

high_flyer
21st March 2007, 10:32
Thank you high_flyer!Basically,you give me the hope that QExtSerialPort can be used in Qt4.
It can.
I am using it in a project I am coding at the moment with Qt4.2.

hiuao
21st March 2007, 11:21
It can.
I am using it in a project I am coding at the moment with Qt4.2.
Why?Haven't you make some changes?
I have to change some code otherwise there will be so much errors.Can you tell me your Qt version?Mine is Qt4.2.1.My email:uaohuyue@126.com,can you send me your code?Maybe I use it improper.
Thank you very much!

high_flyer
21st March 2007, 11:33
You don't have to change anything if you are using version 1.0.
http://qextserialport.sourceforge.net/#documentation
Make sure you read the docs, and don't forget to add the compiler options as noted in the docs.
If you are working with version 1.0 alreaedy and you still have errors, then you are doing, something wrong, then post your code and we can see from there.

hiuao
21st March 2007, 11:47
You don't have to change anything if you are using version 1.0.
http://qextserialport.sourceforge.net/#documentation
Make sure you read the docs, and don't forget to add the compiler options as noted in the docs.
If you are working with version 1.0 alreaedy and you still have errors, then you are doing, something wrong, then post your code and we can see from there.
Thank you high_flyer!I am looking the docs,if there are still something wrong,I would post my
code.

hiuao
22nd March 2007, 06:23
I found out my code downloaded is not as the docs discribed,I downloaded the 0.9 version,if high_flyer see my words,can you post them here?I cann't find the 1.0 version,otherwise I have to copy little by little from the docs.Thank you very much!

high_flyer
22nd March 2007, 10:15
But I gave you the link!
In the link I posted in my prvious post, look down, you will see links for the cvs repositories.

hiuao
23rd March 2007, 06:24
But I gave you the link!
In the link I posted in my prvious post, look down, you will see links for the cvs repositories.

Yes,I can copy the files through cvs.I didn't know cvs before,I am a little shy.:o

high_flyer
23rd March 2007, 10:23
There is alsways a first time ;)