参考博客: https://blog.csdn.net/m0_37777700/article/details/133885272 error use of undeclared identifier ‘mainwindow‘ semantic issue in QtCreator在 QtCreator 中错误使用未声明的标识符“