the problem is the direction of data.
the readyRead signal will be emitted when data is available to read during input of data.
the bytesWritten will be emitted when data has been written to device during output of data.

The data is written by whom? By your own application? In that case, you can use bytesWritten(). However, even in this case, the number of bytes written is out of your control. However, it seems that you're using readyRead() now, and that would mean that you are reading now.

I'm really not sure what you want to achieve... Why is it an issue that you don't get a constant number of bytes from readyRead?

basically what i want is, every time when i get this signal ( bytesWritten() or readyRead() ) , i want constatnt number of bytes to be available to read...
but this is not happening when i used readyRead(), thats why i was trying to use bytesWritten() signal, but even after using bytesWritten() signal, if i am not able to control the number of bytes then i think i have to use readyRead only, i have no other option...

thanx andre...

There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code.

No chance, with neither of the methods will give you such a guarantee. If you're reading, you cannot just use the bytesWritten signal because you think it suits your fancy. It just doesn't work that way.

For your actual issue, I would probably just:

ignore the signal if the number is lower than what I'd like, and

just read the wanted number of bytes if the number is equal or higher than what I'd like