[Qt-interest] QFile.waitForReadyRead() not working on dev file

Thiago Macieira thiago.macieira at trolltech.com
Wed Mar 18 08:28:23 CET 2009


Linus Casassa wrote:
>waitForReadyRead() always returns 0 without waiting 1 second. It prints
>thousands of "looping"s.

waitForReadyRead() doesn't do anything in QFile. You have to use 
QSocketNotifier and an event loop if you want to do that. And you must 
understand your code will be non-portable (QSocketNotifier only works on 
sockets on Windows).

-- 
Thiago Macieira - thiago.macieira (AT) nokia.com
  Senior Product Manager - Nokia, Qt Software
      Sandakerveien 116, NO-0402 Oslo, Norway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090318/ebb3d3f6/attachment.bin 


More information about the Qt-interest-old mailing list