[PyQt] some questions for a syntaxhighlighting component

Detlev Offenbach detlev at die-offenbachs.de
Sun May 6 06:01:56 BST 2007


On Sonntag, 6. Mai 2007, David Boddie wrote:
> On Friday 04 May 2007 12:08:15 +0200, kib2 wrote:
> > 1. I've downloaded the last version of PyQt, now I wanted to test the
> > QtScintilla control but I'm on a Vista machine and I've got
> >   problems compiling SIP with MingW (not entirely Vista compatible ?).
> > Does anyone have some hints to help me ?
>
> I'm not even using Windows! Maybe someone else has already encountered this
> issue.
>
> > 2. I've tried the syntaxhighlighter demo without success, only the first
> > line of a file is highlighted.
> >   The Qt4.2.3 C++ version works pretty well on my machine. What's wrong ?
>
> I think there's a bug in the Python port of the example. Could you possibly
> take a look at it and see if you can fix it? :-)
>
> > 3. In looking at the syntaxhighlighter demo code, I saw that it used a
> > simple TextEdit control. The only problem I see with it is that I cannot
> >   see any gutter margin for line numbers/folding. Did someone wrote
> > something similar already or do you have any idea on how to do this ?
>
> I think someone may have done this for one of the C++ IDEs that have
> appeared over the last year or so. Maybe you can take a look at how it was
> done in QDevelop, for example:
>
>   http://kde-apps.org/content/show.php/QDevelop?content=49498
>
> David
>

Why not use the QScintilla2 editor widget instead of QTextEdit. QScintilla2 
comes with linenumber margin, foldmargin, syntax highlighting, ...

Detlev
-- 
Detlev Offenbach
detlev at die-offenbachs.de



More information about the PyQt mailing list