Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QGamepadManager: saving/loading changed button configuration

QGamepadManager: saving/loading changed button configuration

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 896 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'm using QGamepadManager to connect the joystick hardware button to a QGamepad::Button. That works so far. But this configuration is lost after closing the application. In the documentation of the QGamepadManager Class is one slot "setSettingsFile(const QString &file)". But there is no information how this process works or how to load the setting file. I checked in the source code the class "QGamepadBackend". There are the methods "QGamepadBackend::readSettings" and "QGamepadBackend::saveSettings".
    Can anyone help me how to use these methods? Everything is private and I cannot access them from my code. I'm really lost here. This is totally new knowledge for me. There is nothing on the internet or in the examples about this and the documentation of QGamepad related classes are slim to non. So far, all I can do in this process is setting the config files name:

    QGamepadManager::instance()->setSettingsFile("joystick.conf");
    

    Thanks!

    raven-worxR 1 Reply Last reply
    0
    • S Schuhmann

      I'm using QGamepadManager to connect the joystick hardware button to a QGamepad::Button. That works so far. But this configuration is lost after closing the application. In the documentation of the QGamepadManager Class is one slot "setSettingsFile(const QString &file)". But there is no information how this process works or how to load the setting file. I checked in the source code the class "QGamepadBackend". There are the methods "QGamepadBackend::readSettings" and "QGamepadBackend::saveSettings".
      Can anyone help me how to use these methods? Everything is private and I cannot access them from my code. I'm really lost here. This is totally new knowledge for me. There is nothing on the internet or in the examples about this and the documentation of QGamepad related classes are slim to non. So far, all I can do in this process is setting the config files name:

      QGamepadManager::instance()->setSettingsFile("joystick.conf");
      

      Thanks!

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

      @Schuhmann
      and this doesn't work? Maybe you just expecting a something different?
      I personally never used it, but i would expect that the configuration is loaded from the file whenever you set it and written to it once you configure a button.

      --- 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

        No, it doesn't. I would expect something like this:

        -I call setSettingsFile()
        -I call configureButton()
        -file "joystick.conf" is created
        -I close the app
        -I restart the app
        -the reconfigured button should work the same

        But no. The button has to be reconfigured again. And the file cannot be found anywhere.

        raven-worxR 1 Reply Last reply
        0
        • S Schuhmann

          No, it doesn't. I would expect something like this:

          -I call setSettingsFile()
          -I call configureButton()
          -file "joystick.conf" is created
          -I close the app
          -I restart the app
          -the reconfigured button should work the same

          But no. The button has to be reconfigured again. And the file cannot be found anywhere.

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

          @Schuhmann
          i checked the sources. There are saveSettings()/readSettings() implementations, but they are never called at any place.

          But note that the Qt Gamepad module is still in Technology Preview state in Qt 5.10

          --- 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
          2

          • Login

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