[PyKDE] QScintilla and Qt4

Thomas Fjellstrom tfjellstrom at gmail.com
Wed Jul 6 19:04:43 BST 2005


On July 6, 2005 12:07 pm, David Boddie wrote:
> On Tue, 05 Jul 2005 18:46:32, Thomas Fjellstrom wrote:
> >And you were 100% correct. It now "works", but is still using the qt3
> > support classes (I'll fix that eventually). And I'm getting this odd
> > warning: QPainter::begin: Widget painting can only begin as a result of a
> > paintEvent
>
> Yes, you shouldn't paint onto widget outside paint events. In theory, there
> should be plenty of ways to work around this, although it might mean a
> certain amount of refactoring.
>
> >There were only two QPainter::begin's ever called in the qscintilla
> > source, and even after commenting them out, I still get the message. I've
> > attempted to ask at #qt on freenode irc, but so far nothing. I'll join
> > the Qt list and see if they have an answer.
>
> I saw the follow-ups in the following thread:
>
> http://lists.trolltech.com/qt-interest/2005-07/thread00187-0.html
>
> Do you want to upload the partially ported code somewhere so that the rest
> of us can take a look? We might be able to make some constructive comments.

I haven't changed the drawingcode (in PlatQt.cpp) much at all. So just look in 
there for how QScintilla works.. Basically, It has a "Surface" object that 
gets instantiated in paintEvent, and the drawing happens in calls to other 
scintilla qt functions called from paintEvent. (mainly in 
ScintillaQt.cpp::paintEvent() and the Surface methods in PlatQt.cpp)

> David
>


-- 
Thomas Fjellstrom
tfjellstrom at gmail.com




More information about the PyQt mailing list