Qt Quick WebGL
The Qt Quick WebGL is a platform plugin that allows for single-user remote access by streaming Qt Quick user interfaces over the network. The UI is rendered in a WebGL™-enabled client browser.
Configuration and Use
In order to use the Qt Quick WebGL plugin, Qt must be configured with OpenGL ES 2 support:
./configure [...] -opengl es2
The plugin has a dependency to Qt WebSockets.
Any Qt Quick application can be launched with the webgl platform plugin as follows:
./qmlapplication -platform webgl
This starts a lightweight web server on port 8080, that the client can connect to with a web browser that supports WebGL. The listening port can be configured as follows:
./qmlapplication -platform webgl:port=80
Keyboard, mouse, touch, and multi-touch events from the client are passed to the application.
Limitations
- Streaming OpenGL® commands over the network imposes an amount of delay compared to running the application locally.
- Desktop applications that use Qt Widgets are not supported by the plugin.
- Text elements may not display correctly when the Text.NativeRendering render type option is set.
- Only one active client per process is permitted. Subsequent clients attempting to connect to the server will see a loading indicator until the previous client disconnects.
- Streaming audio is not supported.
Note: The webgl
plugin requires a threaded render loop. On Windows and other platforms that use a different render loop by default, set the QSG_RENDER_LOOP
environment variable accordingly:
set QSG_RENDER_LOOP=threaded