Attached is a minimalised version of the configureButtons example shipped with Qt.
With this, our gamepad works.
After renaming the folder and pro file to e.g. configureButtons2, our gamepad does not work anymore.
The gamepad in question is an NES clone: https://www.sertronics-shop.de/computer/pc-peripheriegeraete/game-controller/2-x-usb-2.0-controller-im-nes-design
In return, I have another project where I cannot get the gamepad to work. If I rename its folder and pro file to configureButtons however, it works.
Note: we did not manage to get any of this to work on Windows