Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Game Development
  4. how to use QGamepadManager::configureButton
Forum Updated to NodeBB v4.3 + New Features

how to use QGamepadManager::configureButton

Scheduled Pinned Locked Moved Solved Game Development
5 Posts 2 Posters 1.8k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Schuhmann
    wrote on last edited by
    #1

    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!

    raven-worxR 1 Reply Last reply
    0
    • S Schuhmann

      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!

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @Schuhmann
      where are your troubles exactly? Did you check out this example? For C++ it should be analogous.

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      0
      • S Offline
        S Offline
        Schuhmann
        wrote on last edited by
        #3

        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);
        
        raven-worxR 1 Reply Last reply
        1
        • S Schuhmann

          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);
          
          raven-worxR Offline
          raven-worxR Offline
          raven-worx
          Moderators
          wrote on last edited by
          #4

          @Schuhmann said in how to use QGamepadManager::configureButton:

          QGamepadManager::instance()->ButtonY

          should actually be used as QGamepadManager::ButtonY

          --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
          If you have a question please use the forum so others can benefit from the solution in the future

          S 1 Reply Last reply
          3
          • raven-worxR raven-worx

            @Schuhmann said in how to use QGamepadManager::configureButton:

            QGamepadManager::instance()->ButtonY

            should actually be used as QGamepadManager::ButtonY

            S Offline
            S Offline
            Schuhmann
            wrote on last edited by
            #5

            @raven-worx Works! Thanks!

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved