A problem with my xbox gamepad when I use QGamepad
-
I'm making a project under Ubuntu20.04 with Qt, I need to get the data of my XBox gamepad, but when I use the function "isConnected()", it returns is always false:
I checked the connection, it is correct, like this:
And the joy_node package is all so can be used:
When I'm running my project, I disconnect my gamepad and it returns the following message:
What should I do, who can help me!
Thanks!!
QAQ -
Hi and welcome to devnet,
From a quick look at the module, I would first use the QGamepadManager class to check what is available.
-
-
If you only have one controller, a more flexible approach would be to take the first value returned by the QGamepadManager rather than hard coding it like that. It's not guaranteed that you will have the same value each time.