When transport is set manually, QMqttClient does nothing after estabilishing connection, because sendControlConnect() method from QMqttConnection is never called.
sendControlConnect() should be called from QMqttConnection::transportConnectionEstablished(). When using default transport, "connected" signal of the socked is connected to transportConnectionEstablished() slot in ensureTransport().
However, when using manually set transport, ensureTransport() returns before connecting that signal to slot.
at the end of QMqttConnection::setTransport() solves the problem, but only for transports that inherit from QAbstractSocket.