how to use QGamepadManager::configureButton
-
wrote on 17 Mar 2018, 20:29 last edited by
I have a joystick connected and I need to reconfigure some buttons.
I read the documentation and checked all Qt examples but still don't know how to start nor can I find any 3rd party example code in the internet.Does anyone have an example on how to usse this SLOT in C++ (without QML)?
Thanks!
-
I have a joystick connected and I need to reconfigure some buttons.
I read the documentation and checked all Qt examples but still don't know how to start nor can I find any 3rd party example code in the internet.Does anyone have an example on how to usse this SLOT in C++ (without QML)?
Thanks!
@Schuhmann
where are your troubles exactly? Did you check out this example? For C++ it should be analogous. -
wrote on 19 Mar 2018, 12:27 last edited by
Ok. There is an instance method which can be used. Here is the c++ syntax that works (e.g. button Y):
int deviceID; QGamepadManager::instance()->configureButton(deviceID, QGamepadManager::instance()->ButtonY);
-
Ok. There is an instance method which can be used. Here is the c++ syntax that works (e.g. button Y):
int deviceID; QGamepadManager::instance()->configureButton(deviceID, QGamepadManager::instance()->ButtonY);
@Schuhmann said in how to use QGamepadManager::configureButton:
QGamepadManager::instance()->ButtonY
should actually be used as
QGamepadManager::ButtonY
-
@Schuhmann said in how to use QGamepadManager::configureButton:
QGamepadManager::instance()->ButtonY
should actually be used as
QGamepadManager::ButtonY
wrote on 19 Mar 2018, 17:25 last edited by@raven-worx Works! Thanks!
1/5