问题
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
来源:https://stackoverflow.com/questions/17424032/line-numbering-of-a-textedit-in-pyqt