清空富文本框内容并恢复初始格式
void RichTextEdit::clearText()
{
ui.textEditMain->clear();
ui.textEditMain->setFocus();
//恢复初始格式
QFont f;
f.setFamily("微软雅黑");
f.setPointSize(10);
ui.textEditMain->selectAll();
ui.textEditMain->setCurrentFont(f);
ui.textEditMain->setTextColor(Qt::black);
ui.textEditMain->setTextBackgroundColor(Qt::white);
}