自己添加了一个qml,并加到主界面上。编译通过,但是显示的时候,出现白屏,其他的内容都不见了。
Log日志上有这个东西:
19-06-26 17:32:17.234 29497-29541/org.mavlink.qgroundcontrol W/QGroundControl: qrc:/qml/MainRootWindow.qml:261 Type FlightDisplayView unavailable
qrc:/qml/QGroundControl/FlightDisplay/FlightDisplayView.qml:684 Type SGTrackToolBar unavailable
qrc:/qml/QGroundControl/Controls/SGTrackToolBar.qml:-1 No such file or directory
将qml从qmldir里删除掉后运行,同样出现白屏。
Log日志:
2019-06-26 17:55:42.522 32372-32405/org.mavlink.qgroundcontrol W/QGroundControl: qrc:/qml/MainRootWindow.qml:261 Type FlightDisplayView unavailable
qrc:/qml/QGroundControl/FlightDisplay/FlightDisplayView.qml:684 SGTrackToolBar is not a type
最终解决方法:
移动qml文件到/qml的根目录下,然后,将此qml添加到对应/qml资源的
按理说,这个资源是可以放置在任意的前缀下的,估计是import这个资源就好了,但是暂时没有时间试。