| 52 | QTextEdit* editor; |
| 53 | public: |
| 54 | void flush(void) { |
| 55 | QTextBlockFormat bf = editor->textCursor().blockFormat(); |
| 56 | bf.setBottomMargin(0); |
| 57 | editor->textCursor().setBlockFormat(bf); |
| 58 | editor->append(buffer); |
| 59 | buffer.clear(); |
| 60 | } |
| 61 | virtual int overflow(int v = std::char_traits<char>::eof()) { |
| 62 | if (v == '\n') { |
| 63 | flush(); |