by mappu · 8y ago · 0 comments
Qt WebGL streaming (qplatform/qpa plugin):
The Qt binary runs on your PC as normal, but instead of opening an X11/Win32 window, opens a network port. You can open the URL in a browser to see the interface. Only one connection is allowed / only one user can interact with the app at a time.
Technology preview since 5.10, will be "TP2" status in 5.11. See http://blog.qt.io/blog/2017/11/14/qt-webgl-cinematic-experie... and http://blog.qt.io/blog/2017/07/07/qt-webgl-streaming-merged/
Qt for WebAssembly:
The entire QtWidgets / QML libraries are compiled to WASM and run clientside. There is no server-side component.
Will be released as a technology preview in the upcoming 5.11 release.
GTK 3 has something like that, too. Tried it once; super weird seeing Nautilus inside a browser. Cool, but weird.
Yeah. It's called Broadway. If someone wish to give a try, see https://developer.gnome.org/gtk3/stable/gtk-broadway.html
But a webgl canvas id doable and I think what they are aiming for. Which would be great for QML.
Also it is very incomplete. For example there's no way to do custom widgets that draw text (e.g. a graph). There's no good text area widget (there is one but it is extremely limited - you couldn't use it for a log output for example).
Plain QtWidgets is way way better on every level except animation and styling. And maybe touch support.
But if I were making a mobile app I'd definitely use Flutter. Much nicer experience than QML.
1. Refactor out to separate components a lot.
2. Use the .ui.qml and .qml code behind pattern to separate UI from code.
3. Use singleton QtObjects to create abstract classes that contain any non-UX behavior.
As for graphing, the built in components work pretty well:
https://doc.qt.io/qt-5.10/qtcharts-index.html
As far as QML widgets go, they have improved greatly since they released Quick Controls 2 (a rewrite of the initial set of controls).