Could be because you connected the readyRead signal to a slot which may cause the data to be read before the other slot fires and has a chance to call bytesAvailable(). Also check if your file isSequential().
Could be because you connected the readyRead signal to a slot which may cause the data to be read before the other slot fires and has a chance to call bytesAvailable(). Also check if your file isSequential().
thanks .i will check that. my file is a QFile object opening a fifo . i will check for that also
fifoFile is not sequential
I think bytesAvailable() will always return 0 in that case. But this is strange... fifos should be sequential... It might be a bug in QFile -- it might not check if file is a fifo. In that case you'll have to rely on readyRead() signal.Originally Posted by quickNitin
in doc sth ambiguous is said about readyRead(). It says readyRead() is emitted everytime when new data is available or appeneded to file. In next para it says in a loop it may not be emitted again.
I cannot understand this distiction fully.
readyRead() signal is also not being generated while on other side of fifo brazenhem's line drawing algo is continuously puttin the points.
I checked it by adding statement
Qt Code:
connect(&fileFifo,SIGNAL(readyRead()),qApp,SLOT(aboutQt()));To copy to clipboard, switch view to plain text mode
is it something abnormal or i am missing sth about behaviour of QIODevice with fifos.
Bookmarks