A further step is moving the qmlglsink element into an extension so there is no need for writing any c++ code!