Search code examples
qtqt5

Qt textBrowser string display with checkbox overwrite problem


enter image description here

when i check other box display to textbrowser first string disappear and second string displayed. How can I print without losing each other?


Solution

  • I guess you can use void QTextEdit::append(const QString &text) (from base class QTextEdit, see https://doc.qt.io/qt-6/qtextedit.html#append) instead of void QTextEdit::setText(const QString &text).