MyWindow.pro文件
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#-------------------------------------------------
#
# Project created by QtCreator 2017-01-05T15:14:18
#
#-------------------------------------------------
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = MyWindow
TEMPLATE = app
SOURCES += main.cpp\
mywindow.cpp
HEADERS += mywindow.h
FORMS += mywindow.ui
INCLUDEPATH += /usr/local/include\
INCLUDEPATH += /usr/local/include/openv
INCLUDEPATH += /usr/local/include/opencv2
LIBS += -L/usr/local/lib \
-lopencv_calib3d \
-lopencv_core \
-lopencv_features2d \
-lopencv_flann \
-lopencv_highgui \
-lopencv_imgproc \
-lopencv_imgcodecs\
-lopencv_ml \
-lopencv_objdetect \
-lopencv_video\
-lopencv_videoio