Pyqt realizes the function of copy, select all and clear in the menu

Time:2020-1-18

Inheritance relationship of text operation of pyqt:

QTextBrowser ( QtGui.QTextEdit)

Qtextedit has the following functions:

Copy() copy

Selectall() select all

Clear() clear

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.

Recommended Today

RCAST 35: add type to currency

– font ALT: Simsun; MSO font charset: 134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 680460288 22 0 262145 0;} @font-face {font-family:”Cambria Math”; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:1; mso-generic-font-family:roman; mso-font-format:other; mso-font-pitch:variable; mso-font-signature:0 0 0 0 0 0;} @font-face {font-family:Calibri; Variable; Ose-1: 216301111; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 680460288 22 0 262145 0;} /\* Style […]