There is a new mechanism for accessing application objects from web content: http://doc.qt.io/qt-5/qwebchannel.html

Even works with websockets and an external browser.

Cheers,
_