[Qt-interest] Generic highlighter
NoRulez
norulez at me.com
Wed Nov 24 11:41:03 CET 2010
Hi,
I managed it as you said and it works, but I still have another problem.
The problem is that if I open a large document (>= 13000 lines of code) the
application hangs for a few minutes (~5 min.) and the cpu usage is ~ 20
percentage.
I also tried to overload the setPlainText() function as followed, but the
problem still exists:
void PlainTextEdit::setPlainText(const QString &text) {
m_pSyntaxHighlighter->setDocument(0);
QPlainTextEdit::setPlainText(text);
m_pSyntaxHighlighter->setDocument(document());
}
Best Regards
NoRulez
Von: qt-interest-bounces at trolltech.com
[mailto:qt-interest-bounces at trolltech.com] Im Auftrag von Leandro T. C. Melo
Gesendet: Mittwoch, 24. November 2010 09:56
An: qt-interest at trolltech.com
Betreff: Re: [Qt-interest] Generic highlighter
On 11/23/2010 2:22 PM, ext NoRulez wrote:
Hi,
shouldn't this do the highlighter?
This is to allow the highlighter to be customized by the application, which
in turn should know what are the formats for each kind of "element". In the
case of Qt Creator, for example, when you change the Color Scheme (Text
Editor -> Font & Colors) the highlighter is re-configured.
Regards,
Leandro.
--
Leandro T. C. Melo
Software Engineer
Nokia, Qt Development Frameworks
Nokia gate5 GmbH
Firmensitz: Invalidenstr. 117, 10115 Berlin, Germany
Registergericht: Amtsgericht Charlottenburg, Berlin: HRB 106443B
Umsatzsteueridentifikationsnummer: DE 812 845 193
Geschäftsführer: Dr. Michael Halbherr, Karim Tähtivuori
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20101124/b88b6f2d/attachment.html
More information about the Qt-interest-old
mailing list