Line-Numbering of a textEdit in pyqt

2019-07-21 07:40发布

问题:

I wish to number the lines in a textEdit in such a way that the line number do not get copied or cut where as the rest of the data which I dump in it can be accesed.

回答1:

You'll need a separate widget on the side to display line numbers. You can find details here: http://harmattan-dev.nokia.com/docs/library/html/qt4/widgets-codeeditor.html