小白 求助 关于 OpenCV3.10 中 Qt New Functions 的使用问题

没接触过qt,在编写程序时想做个界面,看见opencv3.10的帮助文档中 提及 Qt New Functions 中的createButton 函数 ,想做个按钮。。结果没找到 createButton ,显示的只有 cvCreateButton。。。用了却显示如下错误。。

严重性 代码 说明 项目 文件 行 禁止显示状态
错误 LNK2019 无法解析的外部符号 cvCreateButton,该符号在函数 main 中被引用 opencv_3.10_test e:\visual studio 2015\Project\opencv_3.10_test\opencv_3.10_test\main.obj 1

严重性 代码 说明 项目 文件 行 禁止显示状态
错误 LNK1120 1 个无法解析的外部命令 opencv_3.10_test e:\visual studio 2015\Project\opencv_3.10_test\x64\Debug\opencv_3.10_test.exe 1

求大神解释。。是这个功能只能在 Qt 项目中使用吗?还是别的问题?。。但我看帮助文档中是直接在main函数中使用的。。

代码如下。。是win32控制台程序
#include
#include
#include
#include

using namespace cv;

typedef struct custom_data
{
int state;
} custom_data_t;

void my_button_cb(int state, void* userdata)
{
std::cout << "@my_button_cb" << std::endl;

// convert userdata to the right type
custom_data_t* ptr = (custom_data_t*)userdata;
if (!ptr)
{
std::cout << "@my_button_cb userdata is empty" << std::endl;
return;
}

ptr->state = state;

// unlock mutex

}

int main()
{
// declare and initialize our userdata
custom_data_t my_data = { 0 };
cvCreateButton("dummy_button", my_button_cb, &my_data, CV_PUSH_BUTTON, 0);
// For testing purposes, go ahead and click the button to activate
// our callback.

// waiting for key press on the console to continue the execution
getchar();

std::cout << "The state retrieved by the callback is: " << my_data.state << std::endl;

return 0;
}