QTextEdit 富文本格式清除
                                                            生活随笔
收集整理的這篇文章主要介紹了
                                QTextEdit 富文本格式清除
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.                        
                                清空富文本框內容并恢復初始格式
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); }總結
以上是生活随笔為你收集整理的QTextEdit 富文本格式清除的全部內容,希望文章能夠幫你解決所遇到的問題。
 
                            
                        - 上一篇: 【Codeforces Round #4
- 下一篇: 2.4G RFID动物耳标解决方案 SI
