@jhowland

@jhowland said in QGamePad disconnect on Ubuntu:

I have working away trying to make my Qt application deal with a gamepad disconnect, and have not succeeded after many hours of trying coding changes, web searching, etc.
The basic problem appears to be that when my application starts, it makes an instance of QGamePadManager, and queries for the list of attached devices. That list never changes, even if I remove my gamepad, delete the object that contains the QGamePadManager, and create a new one. It seems like the evdev list never refreshes.
This is crippling to my application, since I am trying to control a remotely operated underwater vehicle, and I need to detect a disconnection of the xbox controller that I am using for an operator interface. I can detect the disconnect by monitoring /dev/input/js0--if it disappears, my controller has disconnected--but I cannot figure out how to reconnect the device.
Is there a way to explicitly get the QtGamePadManager to reread the list of connected devices? Is this component fatally flawed? This apparent bug has been reported for years, with no apparent action to fix it.

what is the kind of this bug ?