qtextedit里面只有QString么?如zd果是,建议用回append(const qstring&)函数,然后toPlainText()即可
bool FCChatDlg::saveFile(const QString& it2)
{
QFile file(it2 + ".txt");
if(!file.open(QFile::WriteOnly |答 QFile::Text))
{
showErrorWidget(tr("Error In Saving File!"));
return false;
}
QTextStream out(&file);
out << textedit->toPlainText();
return true;
}