HomeModelTaskItem::HomeModelTaskItem(QWidget *parent, QString name, QString desc, QString date, QString url) : QWidget(parent), ui(new Ui::HomeModelTaskItem) { qDebug() << this->ui->labModelTaskName; ui->setupUi(this); }
访问控件时,必须在调用ui->setupUi(this)方法之后,在之前就会直接报错