Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. How to use the Settings operation

How to use the Settings operation

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
2 Posts 2 Posters 350 Views
  • 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.
  • P Offline
    P Offline
    Peter Smithson
    wrote on last edited by
    #1

    Hi,

    The manual page mentioned an operation which might be useful to me but I can't understand what it means. It's the "Settings" operation. The manual says:

    Sets or removes the value of key in the settings file located at path,
    depending on the value of method: set, remove, add_array_value, and remove_array_value.
    Example: component.addOperation("Settings", "path=settings.ini", "method=add", "key=myKey", "value=myValue")
    

    I tried it with something like the provided example but it tells me that the operation isn't supported and

    Current method argument calling "Settings" with arguments "path=~/.config/installed_components.ini; method=add; key=myKey; value=/home/peter/ascm-4.7.0/" is not supported.
    Please use set, remove, add_array_value, or remove_array_value.
    

    I've used the example provided so not sure what I did wrong.

    Are there any examples or tutorials for this one?

    Thanks.

    Peter

    1 Reply Last reply
    0
    • T Offline
      T Offline
      twohobos
      wrote on last edited by
      #2

      "method=add" doesn't exist - it looks like the docs are out of date.
      You probably want "method=set"

      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