Maybe QTextDocument::loadResource() would do the trick? Requires subclassing, though. At least worth trying.