Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-129137

GraphsTheme seriesGradients can't be used from QML

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: P1: Critical P1: Critical
    • None
    • None
    • Graphs: 3D
    • None
    • f5007eaa9 (dev), f85f4adba (6.8), 232044f19 (6.8.0)

      This:

      GraphsView {
          theme: GraphsTheme {
                     seriesGradients: [gradient1, gradient2]
                 }
                 Gradient {
                     id: gradient1
                     GradientStop { position: 0.0; color: "red" }
                     GradientStop { position: 0.33; color: "yellow" }
                     GradientStop { position: 1.0; color: "green" }
                 }
                 Gradient {
                     id: gradient2
                     GradientStop { position: 0.0; color: "blue" }
                     GradientStop { position: 0.33; color: "red" }
                     GradientStop { position: 1.0; color: "blue" }
                 }
          }
      }

                      
      Outputs: "Unable to assign QJSValue to QList<QLinearGradient>"

      And this:

      {{ }}

      GraphsView {
          theme: GraphsTheme { seriesGradients: [
              Gradient {
                  GradientStop { position: 0.0; color: "red" }
                  GradientStop { position: 0.33; color: "yellow" }
                  GradientStop { position: 1.0; color: "green" }
              },
              Gradient {
                  GradientStop { position: 0.0; color: "blue" }
                  GradientStop { position: 0.33; color: "red" }
                  GradientStop { position: 1.0; color: "blue" }
              }
          ]
          }
      }

      Outputs: "Cannot assign multiple values to a singular property"

      Can seriesGradients be set / get from QML? If not, some API adjustments might be needed.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            oulu_hillbilly Sami Varanka
            kagro Kaj Grönholm
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes