- 现象:程序在调用QFileSystemModel对象的setRootPath方法后异常退出
- 原因:main函数中创建的Application对象为QGuiApplication类型
- 解决方法:将Application对象替换为QApplication类型
- Qt帮助文档的相关描述(https://doc.qt.io/qt-5/qfilesystemmodel.html)如下图
QFileSystemModel:setRootPath导致Segmentation fault
最新推荐文章于 2022-10-30 22:59:19 发布