原因:在mainwindow.h中声明了xxx,但在mainwindow.cpp中未使用 解决方法:在mainwindow.cpp中实现以下xxx,代码如下: void MainWindow:xxx() { }