Alright, I found a workaround that works, but it's weird. Apparently the issue was with the QByteArray, as taking the output of doc->toString() and putting it into the QXmlStreamReader constructor made the whole thing work. I don't know if this is an issue of the output from QDomDocument->toByteArray or with the QSvgRenderer trying to load it or with the QByteArray itself, but as the above output shows, the data itself remains valid at every state prior to the renderer trying to load it. I hesitate to call this a fault of Qt (especially since that seems so taboo and I don't really have the experience or evidence to make a call like that), but this is a really confusing case and I can't imagine what else it could be.