PDA

View Full Version : folding a text



deeee
26th May 2010, 16:58
Hello,

I'd like to be able to hide a part of a text in a QplainTextEdit window.
For example, I'd like to be able to hide a comment block in a C function, with a "-" on the left of the text, which will then become a "+".
How could I do that ?
Thanks.

tbscope
26th May 2010, 17:07
You might find some inspiration here:
http://qt.gitorious.org/qt-creator/qt-creator/blobs/master/src/plugins/texteditor/basetexteditor.h
http://qt.gitorious.org/qt-creator/qt-creator/blobs/master/src/plugins/texteditor/basetexteditor.cpp