Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    Solved how to use QGamepadManager::configureButton

    Game Development
    2
    5
    1407
    Loading More Posts
    • 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
      Schuhmann 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!

      raven-worx 1 Reply Last reply Reply Quote 0
      • raven-worx
        raven-worx Moderators @Schuhmann last edited by

        @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 Reply Quote 0
        • S
          Schuhmann 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);
          
          raven-worx 1 Reply Last reply Reply Quote 1
          • raven-worx
            raven-worx Moderators @Schuhmann last edited by

            @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 Reply Quote 3
            • S
              Schuhmann @raven-worx last edited by

              @raven-worx Works! Thanks!

              1 Reply Last reply Reply Quote 0
              • First post
                Last post