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

QXYSeries: Provide ways for advanced draggable handling

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • None
    • Graphs: 2D
    • None

    Description

      I wanted to restrict the way draggable works on a Series. For a simple QML LineSeries like this:

      LineSeries {                                                               
          width: 2                                                               
          draggable: true                                                        
                                                                                 
          pointDelegate: Rectangle {                                             
              property int pointIndex                                            
                                                                                 
              width: 10; height: width                                           
              color: pointIndex <= 0 || pointIndex >= 4 ? "transparent" : "blue" 
          }                                                                      
                                                                                 
          XYPoint {x: 0; y: 0}    // Do not make draggable                       
          XYPoint {x: 1; y: 1}    // Only enable horizontal dragging             
          XYPoint {x: 2; y: 0.5}  // Only allow dragging in specific range       
          XYPoint {x: 3; y: 0.5}                                                 
          XYPoint {x: 4; y: 0}    // Do not make draggable                       
      }                                                                          
                                  

      I couldn't find a way to fulfill the requirements of the comments. It would be great to have more fine-grained control. For instance:

      • Disable draggability on some points
      • Restrict draggabillity to be inside a specified range or along horizontal/vertical lines. Perhaps providing a hook into the drag event and letting the user handle it optionally would resolve this.

      Attachments

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

        Activity

          People

            kagro Kaj Grönholm
            dennisoberst Dennis Oberst
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes