Results 1 to 2 of 2

Thread: Unable to read from QTcpSocket

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Unable to read from QTcpSocket

    If you want to use the asynchronous QTcpSocket interface, get rid of that while loop and msleep() and invoke QThread::exec() to start the event loop. Otherwise you have to invoke waitForReadyRead() to allow the socket to receive data.

  2. The following user says thank you to jacek for this useful post:

    jimroos (5th July 2007)

Similar Threads

  1. How to read more bytes using QTcpSocket?
    By vishesh in forum Qt Programming
    Replies: 1
    Last Post: 3rd July 2007, 20:23
  2. How to read CD with read?
    By vishal.chauhan in forum Qt Programming
    Replies: 6
    Last Post: 29th June 2007, 08:20
  3. Replies: 2
    Last Post: 23rd June 2007, 09:13
  4. Strange QTcpSocket behavior (debugged with Ethereal)
    By mdecandia in forum Qt Programming
    Replies: 23
    Last Post: 28th May 2007, 20:44
  5. QIODevice read()
    By ShaChris23 in forum Newbie
    Replies: 1
    Last Post: 3rd May 2007, 00:29

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.