Quote: 引用:if ( (qobject_cast<QPushButton*>(sender()))->text() == tr("发送")){ if (text->toPlainText() != "") { text->toPlainText().append(****); } else { ******* } }QTextEdit *pEdit=this->findChild<QTextEdit *>("text_input"); QString str=pEdit->toPlainText(); ui->text_main->toPlainText().append(str);我这样写点发送发不过去,哪错了你能给我写写么?我确实不会。
if ( (qobject_cast<QPushButton*>(sender()))->text() == tr("发送")){ if (text->toPlainText() != "") { text->toPlainText().append(****); } else { ******* } }