QTextEdit* m_textShower;//显求读取文件内容的文本
m_textShower = newQTextEdit;
(1)设置字体的方法
..............
QFonttextFont;
textFont.setPointSize(16);
m_textShower->setFont(textFont);
(2)设置编辑为只读属性的方法
m_textShower->setReadOnly(true);
(3)设置文字的方法
QTextCursorcsor = m_textShower->textCursor();
csor.movePosition(QTextCursor::Start);
csor.insertText(fileContext);
(4)清除文字的方法
m_textShower->clear();