Xuchus 2025-02-08 10:05 采纳率: 25%
浏览 7

ARM移植qml程序后,加载到switch控件就会跳出的问题

关于ARM移植qml程序后,加载到switch控件就会跳出的问题
详细描述和经过在虚拟机的运行是没问题的,然后移植好所有的库后,返现在加载到switch控件时就会跳出(每个页面加载该CtrlItem_CCLF2.M_switch_style控件都会,CtrlItem_CCLF2本身并没问题)
详细代码如下:

GridLayout {
        columns:1
        rows: switch_cdev_ctrl.count
        anchors.top: button_AE_OFF.bottom
        anchors.topMargin: 10
        anchors.left: button_autoAWB.left
        rowSpacing: 10
        Repeater {
            id: switch_cdev_ctrl
            model: [$main_color]
            //dump:tiao chu
            CtrlItem_CCLF2.M_switch_style {
                checkedColor: modelData
                checked: camera_video_show.qmlcall_GetCameraStatus()?true:false;
                width: 300
                onCheckedChanged: {
                    if (index === 0 && checked) {
                        console.log("camera open");
                        camera_video_show.qmlcall_Init_VideoStream();
                    }
                    else  if (index === 0 && !checked)
                    {
                        console.log("camera close");
                        camera_video_show.qmlcall_Stop_VideoStream();
                    }
                    console.log(camera_video_show.qmlcall_GetCameraStatus())
                }
            }
        }
    }//GridLayout

发现过程:屏蔽M_switch_style的几乎所有代码,只留了

Switch {
    id: root
    property color checkedColor: "#0ACF97"
  hoverEnabled: true
}

加载到该控件依然会跳出。只有屏蔽掉这段使用控件代码才不会跳出。问题是哪里?如何修改有效?可以有什么替代方法吗?

  • 写回答

4条回答 默认 最新

  • Xuchus 2025-02-08 10:48
    关注

    不要用AI了,没用,加载到switch本身就跳出

    评论

报告相同问题?

问题事件

  • 创建了问题 2月8日