QQuickWidget shows random shapes upon first run

When my application containing QQuickWidget is run for the first time on a new Windows computer, it shows random shapes in place of the QML scene. It looks like fragments of the QWidgets that are surrounding the QQuickWidget. After closing the app and running again it runs perfectly fine. The problem can't be reproduced by uninstalling the app and removing all settings. It just works fine till the end of times on that computer. What could be causing this? Is Qt Quick making some permanent setting to the OS?