C:\項目\ QTProjects \ SampleProject \ mainsample.cpp:18:錯誤: '類QPlainTextEdit' 沒有成員命名爲 '文''類QPlainTextEdit' 沒有名爲成員 '文本'
#include "mainsample.h"
#include "ui_mainsample.h"
MainSample::MainSample(QWidget *parent)
: QMainWindow(parent)
, ui(new Ui::MainSample)
{
ui->setupUi(this);
}
MainSample::~MainSample()
{
delete ui;
}
void MainSample::on_pushButton_clicked()
{
ui->TxtAns->text(TxtFnum->text().toInt() + ui->TxtSnum->text().toInt());
}
什麼似乎是問題?