MacOS - Xcode项目导入QT框架
在项目Build Phases > Link Binary With Libraries点击+
下图是xcode 8.0的选项,选项可能有些字面上的差异,不过都大同小异。
点击Add Other...
选择QT安装路径下的framework
在文件中使用#include<>导入QT,例如
Build Settings > Header Search Paths中添加你的QT安装路径下相应的framework路径,例如:
#include <QtWidgets>
,如果报错,那么需要在Build Settings > Header Search Paths中添加你的QT安装路径下相应的framework路径,例如:
/usr/local/Cellar/qt/5.10.1/lib/QtWidgets.framework/Headers