class Ui MainWindow has no member named actionnew ui actionnew ssetIcon的错误解决方案
C:\Users\Administrator\Desktop\untitled\mainwindow.cpp👎 In
constructor ‘MainWindow::MainWindow(QWidget*)’:C:\Users\Administrator\Desktop\untitled\mainwindow.cpp:12: error:
‘class Ui::MainWindow’ has no member named ‘actionnew’
ui->actionnew->setIcon(QIcon(":/Image/Frame.jpg"));
^
当看见这种错误,你应该看看你的UI的界面的按钮,双击进入
//与UI中的标识一一对应
ui->actionnew_2->setIcon(QIcon(":/Image/Frame.jpg"));
ui->actionne->setIcon(QIcon(":/Image/up.png"));
@Author: cpu_code
@Date: 2020-06-14 11:01:59
@LastEditTime:2020-06-17 21:47:53
@FilePath: \QT\source\mainWindow.cpp
@Gitee:https://gitee.com/cpu_code
@CSDN:https://blog.csdn.net/qq_44226094