Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User gravity0's Avatar
    Join Date
    May 2009
    Location
    Belluno, Italy
    Posts
    11
    Hello everybody,
    I have just created two classes (CPPHighlighter and CSharpHighlighter) that inherits from QSyntaxHighlighter to provide colored Source Code on a TextEdit.

    I have also created a menu to switch between them. However when I switch the code is not highluighte in the new language but keeps old highlighting. Any suggestions on how to fix this (could be that highlightblock is called only when text changes). CPPHighlighter is almost the same as in the QSyntaxHiglighter Demo.

    Thanks

  2. #2
    Nokia Developer Moderator divanov's Avatar
    Join Date
    Oct 2009
    Posts
    4,326
    Did you try QSyntaxHiglighter::rehighlight()?
    http://doc.qt.nokia.com/4.6/qsyntaxh...ml#rehighlight

  3. #3
    Registered User gravity0's Avatar
    Join Date
    May 2009
    Location
    Belluno, Italy
    Posts
    11
    Thank you so much... I didn't know about that. Now it should work.

Similar Threads

  1. Need Listbox and TextEdit on screen
    By blackpaw in forum Python
    Replies: 2
    Last Post: 2008-04-03, 14:29

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved