[QT的学习]使用ChartView的问题

在qml中使用ChartView时,MouseArea出现覆盖未找到解决方案.

ChartView
    {

        width: parent.width
        height: parent.height

        antialiasing:true
        backgroundColor:"black"

        /*图例*/
        legend.visible: false


        /********X-time********/
        ValueAxis
        {
            id:axisx
            gridVisible: gridVisble
            min: 0
            max: 30
            tickCount: 11
            labelFormat: "%d"
            labelsColor : "white"
        }


        ValueAxis
        {
            id:axisy
            min: 0
            max: 30
            labelsColor : "white"
        }



        LineSeries
        {
            id:lineSeriesSend
            axisX: axisx
            axisY: axisy 
            color: "red"

            /*******鼠标处理1*******/
            onClicked:
            {
                console.log("JJJJJJJJJJJJJJjjj")
            }
            onHovered:
            {
                console.log("JJJJHHHHHHHHHHHHHHhhhhh")
            }

        }

        LineSeries
        {
            id:lineSeriesReceive1
            axisX: axisx
            axisY: gridVisble ? axisy : axisy1
            color: "#FF4341"
            width: 3
        }


        /****鼠标处理2*****/
        MouseArea
        {
            anchors.fill: parent
            hoverEnabled:true

            onWheel: {}
            onClicked:{}
        }

    }

从上述代码中有两个鼠标处理区域1跟2,目前鼠标处理2生效,但是鼠标处理1不生效。有解决方案的大牛可以答复怎么修改处理

最新回复(0)
/jishuv1kMe6aR_2FpdySDCk7b8Q_2F_2FO8cqyhHZ1CnUHzSDn_2F9ac_3D4696058
8 简首页