Results 1 to 20 of 26

Thread: QTcpSocket: no readyRead() signal even in Qthread event loop

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #13
    Join Date
    Jan 2006
    Location
    Sta. Eugènia de Berga (Vic - Barcelona - Spain)
    Posts
    869
    Thanks
    70
    Thanked 59 Times in 57 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QTcpSocket: no readyRead() signal even in Qthread event loop

    Hi,

    First of all, are you sure that you need threads for this?

    If you comment "waitForReadyRead()" is normal that you get "num == 0" because you are not waiting to get data into the socket, you only ask how many data is into the buffer and the buffer is not filled until some data arrives. You are expecting to have data into the buffer, but the application that have to write data still not wrote it.
    Òscar Llarch i Galán

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

    R-Type (15th December 2011)

Similar Threads

  1. Replies: 1
    Last Post: 22nd July 2010, 09:16
  2. Terminate a QThread with an event loop
    By paolom in forum Qt Programming
    Replies: 2
    Last Post: 12th May 2010, 11:53
  3. QThread event loop blocking the GUI
    By JoeMerchant in forum Qt Programming
    Replies: 4
    Last Post: 18th July 2009, 07:54
  4. QThread event loop seems blocked
    By eurodatar in forum Qt Programming
    Replies: 3
    Last Post: 6th May 2009, 16:50
  5. Workload in a QThread blocks main application's event loop ?
    By 0xBulbizarre in forum Qt Programming
    Replies: 14
    Last Post: 9th April 2006, 21:55

Tags for this Thread

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.