Reputation: 631
How can I clear the content of QTextBrowser
?
I have tried clearHistory() as well as setting the cursor opstion but didint help
does anyone know how to clear the content of the Qtextbrowser
Upvotes: 3
Views: 4553
Reputation: 243973
QTextBrowser
inherits from QTextEdit
so its methods also inherit it, considering the above a QTextEdit
clear the contents with the clear()
method so it also works for QTextBrowser
: self.textBrowser.clear()
.
Recommendation: You should read the Qt docs to know all the methods of each class, for example from QTextBrowser https://doc.qt.io/qt-5/qtextbrowser-members.html
Upvotes: 6