On Mon, Feb 9, 2009 at 10:28 AM, Henning Schröder <[email protected]
> wrote:

>
> > The problem is that QSyntaxHighlighter.highlightBlock is passed only the
> string to be colored, *not* the offset of that string in the entire text.
> >
> Since Qt 4.4 there is QSyntaxHighligher.currentBlock()
> You should be able to use QTextBlock.postion() then to get the offset


Many, *many* thanks for this reply.  This eliminates the need for an
impossible-to-get-right method that I have been working on for days.  Now
everything "just works".

Edward
--------------------------------------------------------------------
Edward K. Ream email: [email protected]
Leo: http://webpages.charter.net/edreamleo/front.html
--------------------------------------------------------------------
_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to