1、配置环境
macos+xcode+opencv4+qt5
2、Windows与macosx运行区别
macosx中运行生成项目文件中不含debug文件:
而在Windows中:
3、解决如下
相应代码如下:
#define FILTERS_SUBFOLDER "/filter_plugins/"
QDir filtersDir(qApp->applicationDirPath() + FILTERS_SUBFOLDER);
更改为:
QDir filtersDir("/Users/kar/Downloads/Computer-Vision-with-OpenCV-3-and-Qt5-master/ch03/build-Plugin_User-Desktop_Qt_5_15_2_clang_64bit-Debug/filter_plugins/");
qApp->applicationDirPath() + FILTERS_SUBFOLDER更改为以上路径即可