Results 1 to 13 of 13

Thread: how to deal the different of qt3 and qt4 for the serial programming?

  1. #1
    Join Date
    Feb 2007
    Posts
    47
    Thanks
    12
    Qt products
    Qt4
    Platforms
    Unix/X11

    Question how to deal the different of qt3 and qt4 for the serial programming?

    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!
    Attached Files Attached Files
    Last edited by hiuao; 19th March 2007 at 07:50.

  2. #2
    Join Date
    Feb 2007
    Posts
    47
    Thanks
    12
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default serial programming attach

    Before this letter I attached 5 files,here is the rest.
    Oh!dear!I tried for many times,but 2 files could't attatch.
    Attached Files Attached Files
    Last edited by hiuao; 19th March 2007 at 05:53.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: how to deal the different of qt3 and qt4 for the serial programming?

    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.

  4. #4
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: how to deal the different of qt3 and qt4 for the serial programming?

    QExtSerialPort is ported to Qt4, i can't remeber the url, but I am sure google will prove helpful.

  5. The following user says thank you to high_flyer for this useful post:

    hiuao (21st March 2007)

  6. #5
    Join Date
    Feb 2007
    Posts
    47
    Thanks
    12
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: how to deal the different of qt3 and qt4 for the serial programming?

    Quote Originally Posted by high_flyer View Post
    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.
    Attached Files Attached Files

  7. #6
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: how to deal the different of qt3 and qt4 for the serial programming?

    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.

  8. #7
    Join Date
    Feb 2007
    Posts
    47
    Thanks
    12
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: how to deal the different of qt3 and qt4 for the serial programming?

    Quote Originally Posted by high_flyer View Post
    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!

  9. #8
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: how to deal the different of qt3 and qt4 for the serial programming?

    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.

  10. The following user says thank you to high_flyer for this useful post:

    hiuao (21st March 2007)

  11. #9
    Join Date
    Feb 2007
    Posts
    47
    Thanks
    12
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: how to deal the different of qt3 and qt4 for the serial programming?

    Quote Originally Posted by high_flyer View Post
    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.

  12. #10
    Join Date
    Feb 2007
    Posts
    47
    Thanks
    12
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: how to deal the different of qt3 and qt4 for the serial programming?

    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!

  13. #11
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: how to deal the different of qt3 and qt4 for the serial programming?

    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.

  14. The following user says thank you to high_flyer for this useful post:

    hiuao (23rd March 2007)

  15. #12
    Join Date
    Feb 2007
    Posts
    47
    Thanks
    12
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: how to deal the different of qt3 and qt4 for the serial programming?

    Quote Originally Posted by high_flyer View Post
    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.

  16. #13
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: how to deal the different of qt3 and qt4 for the serial programming?

    There is alsways a first time

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.