### Method

# GObject Value set_variant

since: 2.26

#### Declaration

    void
    g_value_set_variant (
      GValue* value,
      GVariant* variant
    )

#### Description

Set the contents of a variant `GValue` to `variant`. If the variant is floating, it is consumed.

Available since: 2.26

#### Parameters

`variant`

  Type: `GVariant`

  A `GVariant`, or `NULL`.

  The argument can be `NULL`.
  The data is owned by the caller of the method.