If the Qt files are read-only, windeployqt will fail with the error "Cannot remove empty directory Z:\work\test-deploy\QtQuick\Controls\Private." After copying files, windeployqt tries to remove some of them, but can't because they are read-only.
The problem is similar to QTBUG-23454 where macdeployqt was not ensuring copied files were writable. A similar fix should probably be applied here. When the files are copied, they should be made writable.
|For Gerrit Dashboard: QTBUG-40152
|windeployqt: Clear read-only attribute when copying files.