Inheritance relationship of text operation of pyqt:
QTextBrowser ( QtGui.QTextEdit)
Qtextedit has the following functions:
Selectall() select all
Although it can be realized by cursor selection, it is more convenient to directly call the method of the parent class, including shortcut keys.
The above pyqt realizes the function of copying, selecting all and clearing all in the menu, which is all the content shared by Xiaobian. I hope it can give you a reference, and I hope you can support developepaer more.