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

No way to declaratively instantiate Path elements in ShapePath

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • 5.11.2
    • Quick: Other

      When using Shape, it would be nice to be able to construct a ShapePath using data from a model. For example, something like this:

       

      Shape {
          ShapePath {
              Instantiator {
                  model: someModel // Anything which implements Qt model API  
                  PathLine {
                      x: xValue // data from item in model
                      y: yValue // data from item in model
                  }
              }
          }
      }
      

      At the moment, this doesn't work, because it tries to add the Instantiator to the pathElements property of ShapePath and can't because it isn't a PathElement itself.

      I haven't been able to find any other way of declaratively building up a ShapePath using data from a model. I believe it would make Shape and ShapePath much more flexible: Having to define all the line segments ahead of time is very limiting and rarely useful in practice.

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

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            THall Tom Hall
            Votes:
            3 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes