pyqt 中 textEdit 的行号 [英] Line-Numbering of a textEdit in pyqt

查看:108
本文介绍了pyqt 中 textEdit 的行号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望对 textEdit 中的行进行编号,这样行号就不会被复制或剪切,因为可以访问我在其中转储的其余数据.

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.

推荐答案

您需要在侧面有一个单独的小部件来显示行号.您可以在此处找到详细信息:http://harmattan-dev.nokia.com/docs/library/html/qt4/widgets-codeeditor.html

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

这篇关于pyqt 中 textEdit 的行号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆