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

Spline element for QML using Path's

XMLWordPrintable

      Background

      It would be very useful to have a spline Element in QML that could be used to represent connections between two or more objects.

      Use cases:

      • Represent Node connections where Text elements can also be used and are positioned at a float 0..1 position between the nodes. E.g. for a Node Editing GUI

      Code examples:

      Node connection

      Rectangle {
         id: aRect; x: 10; y: 10; width: 10; height: 10
      }
      Rectangle {
         id: bRect; x: 30; y: 50; width: 10; height: 10
      }
      
      Spline {
         id: abSpline
         from: aRect
         to: bRect
         path:  Path {
                   startX: 120; startY: 100
                   PathQuad { x: 120; y: 25; controlX: 260; controlY: 75 }
                   PathQuad { x: 120; y: 100; controlX: -20; controlY: 75 }
               }
         label: Text { text: "A to B" }
         label.position: 0.5
      }
      

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

            martjone Martin Jones (closed Nokia identity) (Inactive)
            hhartz Henrik Hartz (closed Nokia identity) (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes