Hello,
We can read this in the Qt Documentation (in the QIODevice class description):
So I tried to subclass QAbstractSocket by reimplementing readData and writeData, but I can't read any data.By subclassing QIODevice, you can provide the same interface to your own I/O devices. Subclasses of QIODevice are only required to implement the protected readData() and writeData() functions. QIODevice uses these functions to implement all its convenience functions, such as getChar(), readLine() and write(). QIODevice also handles access control for you, so you can safely assume that the device is opened in write mode if writeData() is called.
I tried readAll, getChar and reading data with a QDataStream and that didn't work.
When I reimplement readAll and getChar by using my readData, that works fine.
So do you think that reimplementing readData and writeData is really sufficient ? Have I to reimplement other functions ?
Bookmarks