Umm...
Based on your code, there is no need to sublcass QIODevice, since you are doing nothing that the current QTcpSockets are not doing (QTcpSocket is a QIODevice).
You detector class can be a simple QObject, which basically managers the the reading and writing to your two sockets (which is basically what your code appears to be trying to do).
Line 37 in your code simply is not needed and is doing nothing of value.
This way you don't have to implement the virtuals of QIOdevice and you can mold your API as you need it.