I tried it a while ago, when I was first starting with Qt...and yeah, doesn't sound so great. The reason why is already explained by SGaist.
I tried a lot of options on Linux (KDE Neon, Fedora), and RHVoice seemed to sound best, but still not quite there, and I'm not sure how are things now, but, if it helps:
https://stackoverflow.com/questions/76094006/how-to-use-rhvoice-via-speech-dispatcher-in-qt
Try different voices and voice settings, or look for other options, perhaps new ones exist now.
I'm also interested to see if anyone has suggestions.