Qt WebAssembly Q&A, Part 1
WebAssembly is a bytecode representation that is meant to be targeted by high-level programming languages such as C++ and to be executed inside a virtual machine in a browser. It will change the way you design your embedded devices, applications, and other software. Qt for WebAssembly allows you to run your C++ applications on popular web browsers, such as Google Chrome and Mozilla Firefox – and our efforts to support more browsers are continuous.
Want to find out more about WebAssembly but don't know what to ask? We quizzed our Senior Product Manager, Veli-Pekka Heinonen, with 11 burning questions sent to us by our dev community. This will be an ongoing series, so do not hesitate to send us your questions for our next edition!
1. Will WebAssembly support the SQL module?
VP: SQLite is currently supported, being part of the QtSQL module.
2. What licence will Qt WebAssembly require in the Qt 6 Lifecycle?
VP: The WebAssembly platform adaptation is licensed under both GPLv3 and Commercial licenses. In other words, it is available for both open source and commercial customers. There are currently no plans to change this dual licensing model for WebAssembly.
Having said that, it is good to remember that additional value-add commercial-only modules such as DesignViewer, or GPLv3 modules such as Qt Charts, are for commercial only, or GPLv3 on all supported platforms for the module, also in addition to WebAssembly.
3. When will Qt WebAssembly offer support for the iOS popup keyboard?
VP: Qt 6.4 has experimental support for the iOS keyboard, bit this feature has not been completed yet.
4. What is Qt doing to support development and deployment of secure WebAssembly applications, especially when accessing local hardware (e.g., audio)?
5. Can a Qt Widget App be created in WebAssembly?
6. If our application uses other third-party libraries like VTK, ITK, and boost, how easy will the deployment process in WebAssembly be using Qt 6.4?
VP: Dynamic linking is not currently supported due to some platform limitations. However, work is ongoing to change that in upcoming versions. Static linking can already be used.
7. Should we activate QT_EMSCRIPTEN_ASYNCIFY, multithreading for WASM?
VP: Asyncify can be enabled if the application makes API calls which block the main thread, such as QDialog::exec(). Multithreading can be enabled if the application requires, or can benefit from using multiple threads in addition to the main thread.
8. Is it possible now (or will it be in the future) to use WebAssembly (including UI) without QML?
VP: Qt for WebAssembly also supports widgets that provide a wide variety of functionality for the UI, although on a lower level. Also, screen reader base support is available for widgets in the dev branch (not in 6.4) for people to utilize if needed.
9. Is WebAssembly fully supported in Qt 5.x?
VP: Qt 5.15 supports WebAssembly as a target, however, with some feature limitations that are being addressed in Qt 6. Professional services can be used to port features from Qt 6 to Qt 5.
VP: File system access is sandboxed on the web, and this has implications for how the application works with files. The Web platform provides APIs for accessing the local file system in a way that is under user control, as well as APIs for accessing persistent storage. Emscripten and Qt wrap these features, and provide APIs which are easier to use from C++ and Qt-based applications.
More info here: https://doc.qt.io/qt-6/wasm.html.
11. Will Qt 6.4 support QOpenGLWidget in WebAssembly?
VP: Yes, QOpenGLWidget now works with Qt 6.4
Have more questions or want to learn more about WebAssembly?
Head on over to our WebAssembly Demos & Examples
Subscribe to our newsletter
Try Qt 6.4 Now!
Download the latest release here: www.qt.io/download.
Qt 6 is the productivity platform for the future, with next-gen 2D & 3D UX and limitless scalability.
Explore Qt World
Check our Qt demos and case studies in the virtual Qt World
Check out all our open positions here and follow us on Instagram to see what it's like to be #QtPeople.
Näytä tämä julkaisu Instagramissa.
Want to build something for tomorrow, join #QtPeople today! We have loads of cool jobs you don't want to miss! http://qt.io/careers #builtwithQt #software #developers #coding #framework #tool #tooling #C++ #QML #engineers #sales #tech #technology #UI #UX #CX #Qt #Qtdev #global #openpositions #careers #job
Henkilön Qt (@theqtcompany) jakama julkaisu