### Method

# Gio Settings set_value

since: 2.26

#### Declaration [src]

    gboolean
    g_settings_set_value (
      GSettings* settings,
      const gchar* key,
      GVariant* value
    )

#### Description [src]

Sets `key` in `settings` to `value`.

It is a programmer error to give a `key` that isn’t contained in the schema for `settings` or for `value` to have the incorrect type, per the schema.

If `value` is floating then this function consumes the reference.

Available since: 2.26

#### Parameters

`key`

  Type: `const gchar*`

  The key to set the value for.

  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

`value`

  Type: `GVariant`

  A `GVariant` of the correct type.

  The data is owned by the caller of the method.

#### Return value

Type: `gboolean`

True if setting the key succeeded, false if the key was not writable.