Results 1 to 2 of 2

Thread: highlight in QTextEdit

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2009
    Posts
    3
    Thanks
    1

    Default highlight in QTextEdit

    Hello,

    I am not using QSyntaxHighlight because I don't know how to use it and my Highlighter works very well but it is the problem it is too slow , I am trying to highlight my own programming language.

    The question is how to get only the part of the String that will be rendered to the user, that will help me a lot because the program only needs to get tokens and replaces a part of the string, my string is too long because I need to encode each token with a long string that QRegExp in QString relace could ignore to find the other tokens without interfering.

    I think QTextEdit uses it internally because when the user scroll down the text it will need to know a starting line and end line to be drawn maybe in it's paint event or something, in that widget, because the text could be greater than the QTextEdit area and the scroll position can change, I am using QT Creator in ubuntu.

    Thank you

    Regards.
    Last edited by ubuntudevelop78; 26th November 2009 at 23:51.

Similar Threads

  1. Vertical centering of a QTextEdit
    By miwarre in forum Newbie
    Replies: 4
    Last Post: 5th October 2015, 05:01
  2. QTextEdit Performance handling large paragraphs
    By netuno in forum Qt Programming
    Replies: 14
    Last Post: 1st September 2010, 22:58
  3. Drawing on QTextEdit
    By jgrauman in forum Qt Programming
    Replies: 3
    Last Post: 7th February 2009, 09:40
  4. QTextEdit slow to insert text
    By thomaspu in forum Qt Programming
    Replies: 4
    Last Post: 10th January 2008, 12:05
  5. QTextEdit API questions (plain text)
    By Gaspar in forum Qt Programming
    Replies: 4
    Last Post: 16th May 2006, 06:03

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.