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 17 Mar 2018, 20:29 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!

    R 1 Reply Last reply 19 Mar 2018, 07:52
    0
    • S Schuhmann
      17 Mar 2018, 20:29

      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!

      R Offline
      R Offline
      raven-worx
      Moderators
      wrote on 19 Mar 2018, 07:52 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 19 Mar 2018, 12:27 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);
        
        R 1 Reply Last reply 19 Mar 2018, 15:12
        1
        • S Schuhmann
          19 Mar 2018, 12:27

          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);
          
          R Offline
          R Offline
          raven-worx
          Moderators
          wrote on 19 Mar 2018, 15:12 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 19 Mar 2018, 17:25
          3
          • R raven-worx
            19 Mar 2018, 15:12

            @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 19 Mar 2018, 17:25 last edited by
            #5

            @raven-worx Works! Thanks!

            1 Reply Last reply
            0

            1/5

            17 Mar 2018, 20:29

            • Login

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