Results 1 to 9 of 9

Thread: problem with QTcpSocket

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: problem with QTcpSocket

    Maybe the database causes the disconnection? My guess is that you shouldn't use QDataStream, it does something more than just stream the data. Try using QTextStream instead.

    Anyway, maybe you should write your own database driver for that database?

  2. #2
    Join Date
    Jan 2007
    Posts
    7
    Thanks
    2
    Platforms
    Unix/X11 Windows

    Default Re: problem with QTcpSocket

    Hi,
    first thanks for your answer. You are the first in 3 forums who gives me a hint in 4 days!
    I try to use QTextStream and write what happens. -> Must I chance QByteArray ?
    Thanks,
    SuperSonik

  3. #3
    Join Date
    Jan 2007
    Posts
    7
    Thanks
    2
    Platforms
    Unix/X11 Windows

    Default Re: problem with QTcpSocket

    Hi,
    I once again . How can I write with QTextStream on QTcpSocket?
    Can someone give me an example?
    Greetings,

    SuperSonik

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

    Default Re: problem with QTcpSocket

    Quote Originally Posted by SuperSonik View Post
    You are the first in 3 forums who gives me a hint in 4 days!
    As you see we have pretty good answer times here.
    I try to use QTextStream and write what happens. -> Must I chance QByteArray ?
    Open the text stream to the byte array and stream the QString contents through. You should end up with a byte array which you can then pass to QTcpSocket::write().

Similar Threads

  1. Problem with QTcpSocket and QDataStream
    By Valheru in forum Qt Programming
    Replies: 4
    Last Post: 16th September 2006, 13:08
  2. QTimer problem ... it runs but never triggs
    By yellowmat in forum Newbie
    Replies: 4
    Last Post: 4th July 2006, 12:54
  3. fftw problem
    By lordy in forum General Programming
    Replies: 1
    Last Post: 16th March 2006, 21:36
  4. Replies: 16
    Last Post: 7th March 2006, 15:57
  5. QTcpSocket disconnection problem
    By erdi in forum Qt Programming
    Replies: 4
    Last Post: 19th February 2006, 21:50

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
  •  
Qt is a trademark of The Qt Company.