PDA

View Full Version : QTextEdit is possible collapse text?



angel75
3rd July 2006, 22:43
Hi, first -=sorry for my english=-
it is possible to relize collapsed text in "QTextEdit" i need to hide/unhide some text like "Kdevelop editor" and how can add line number?
all my attempt are fail.
if you have some links, tutorial or if the question is in another thread...

thanks to all

Sorry my english is too bad

-=angel75=-

fullmetalcoder
4th July 2006, 09:45
it is possible to relize collapsed text in "QTextEdit" i need to hide/unhide some text like "Kdevelop editor" and how can add line number?
all my attempt are fail.
if you have some links, tutorial or if the question is in another thread...

This topic has been discussed a lot when I started the developpment of the now defunct DevQt. You should find the thread using the search function of QtCentre and typing something like "text editor with line numbers".

I myself have written such a widget for my IDE project (BTW version 0.4.2 of Edyuk is out. Get it on Sourceforge (https://sourceforge.net/project/showfiles.php?group_id=168260)! ;) ) and pasnox, author of Monkey Studio, aka Qt4DS, as also writen one. These sources being released under GPL you won't have any problem to adapt them to your needs.

The text folding is a little more complicated because it is a low-level interaction with the data of the document being displayed by your editor. Townk has made a little editor that allowed text folding but it was a little buggy with nested folding and I don't know if he progressed. For more information check out member list and try to contact him.



Sorry my english is too bad

Believe me it will improve a great deal if you stay on this board and speak every time you have something to say...

angel75
4th July 2006, 14:09
thanks FullMetalcoder :)

for line numberi have solved i found a lot of example in this forum thanks :)
now i search how to hide/unhide text.

Thanks
this forum is cool :)