Use new API in Qt, adapt to changes in Qt and Emscripten.
Incremental step towards Qt 6.6 support (see QDS-9900).