Can you share what you have so far?
You can set the Inner HTML of any Hype element using:
hypeDocument.getElementById('idofElement').innerHTML = QRtext;
But if you are capturing that text within an HTML widget, you won’t be able to affect the contents of the parent window (this is a security risk) without using the Postmessage system. A bit more info on that here.