While starting up, QTcpSocket::connectToHost() might never timeout, nor return success or failure. As a consequence, Qt Mqtt stays in connecting state forever.
Even more problematic is, that a manual disconnectFromHost() does not work either as it only allows to send a DISCONNECT frame and close the connection once a connection has been established.
The current workaround is to access the QTcpSocket via QMqttClient::transport() and call close() on it. This emits all disconnected signals and the QMqttClient returns into a valid state from where it can retry to connect.