在项目Build Phases > Link Binary With Libraries点击+
点击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