Yes, it works with connectToHostEncrypted() on the client, but only when server is configured with some certificate and key.
But still it is not solution for my problem. I need to divide communication to unsecured mode and secured mode. In first step i received some info and after that I need to toggle to secure mode. But all communication should be on the same connection.

On the first step I want to connect without encryption
Qt Code:
  1. m_pSslSocket->connectToHost(address, port);
To copy to clipboard, switch view to plain text mode 
and after a while toggle client to encryption
Qt Code:
  1. m_pSslSocket->startClientEncryption();
To copy to clipboard, switch view to plain text mode