[Qt-interest] Line numbers on QTextEdit

Geir Vattekar gvatteka at trolltech.com
Mon Mar 16 12:33:56 CET 2009


Hi,

The Code Editor Example implements line numbers for a QPlainTextEdit.
You can use a similar approach for a QTextEdit.

You find the example
here: (http://doc.trolltech.com/4.5-snapshot/widgets-codeeditor.html)


Regards,

Geir Vattekar
--
Technical Writer, Qt Software, Nokia

On Mon, 2009-03-16 at 09:01 +0530, Raja Sekharan wrote:
> Hi,
>  
> Does the textedit widget allow you to show line numbers? I tried a not
> so elegant solution of inserting line numbers as inline HTML tags as
> part of the content in the web page but that didn't go well as it
> couldn't be integrated with a Go To Line feature. How would you
> accomplish attaching line numbers to a QTextEdit from the Qt API?
>  
> Thanks in Advance,
>  
> With Regards,
> Raja Sekharan
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest





More information about the Qt-interest-old mailing list