QtCreator error: "legend" does not have members (M17)



  • Using ChartView in QtCreator, I want to hide the default legends for the series I add to a chart so that I can display my own custom legend. For example, I have a ChartView with id "chartMilestones", so I put in the QML file

        chartMilestones.legend.visible: false
    

    but QtCreator underlines the word legend in red and displays the error

    "legend" does not have members (M17)
    

    The code seems to do what I want when it's run, without complaining, but the Design view doesn't work with this error in the QML. It also appears that I can set the visibility in a JavaScript function without an error.

    Is there something I need to add to avoid the error markers?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.