1.QT的下载和安装
QT下载地址 http://download.qt.io/archive/qt/
注意和vs的版本要相同。
vs的话要下载和安装QT的vs插件 http://download.qt-project.org/official_releases/vsaddin/qt-vs-addin-1.1.11-opensource.exe
2.配置opencv
在QTCreater里面修改.pro文件,配置opencv头文件和库文件如下,一定要注意格式!参照http://www.librehat.com/qt-5-2-vs2012-opencv-2-4-7-dev-environment-setup-tutorial/
INCLUDEPATH += E:/Documents/Opencv/opencv/build/include win32:CONFIG(debug, debug|release): { LIBS += -LE:/Documents/Opencv/opencv/build/lib/Debug -lopencv_core320d -lopencv_highgui320d -lopencv_imgcodecs320d -lopencv_imgproc320d -lopencv_video320d -lopencv_videoio320d }else:win32:CONFIG(release,debug|release):{ LIBS += -LE:/Documents/Opencv/opencv/build/lib/Release -lopencv_core320 -lopencv_highgui320 -lopencv_imgcodecs320 -lopencv_imgproc320 -lopencv_video320 -lopencv_videoio320 }
3. 用vs时ui文件打不开,designed.exe,按照网上说的 把designed.exe文件夹里的一个名叫Qt5WebEngine.dll的dll改下名就可以了。