Since all my posting on the Qt bug report whose fix caused this problem in the first place seems to have been ignored, I opened a new bug report with Qt, that at least shows the code they are using is broken.
For the record, here is the new bug report:
https://bugreports.qt.io/browse/QTBUG-116499