[PyKDE] Canvas problems

Mark Kimsal chugadie.geo at yahoo.com
Tue Dec 12 19:38:54 GMT 2000


Boudewijn Rempt wrote:

> On Tue, 12 Dec 2000, Boudewijn Rempt wrote:
>
> > On Thu, 14 Dec 2000, Mark Kimsal wrote:
> >
> > > I am having problems working with QCanvas and QCanvasItem objects
> > >
> > > Is there any sample code for using QCanvasItems?
> > >
> >
> > I don't think you can really use QCanvasItems... Look at eric the
> > debugger's Scanner.py file - that's what I used as an example for
> > the canvaswork in Kura. That's a pretty complicated example: get
> > it at http://www.valdyas.org/linguistics, and look for the files
> > kurailcanvas.py and kurailcanvasview.py.
> >
>
> Oh, and I forgot: at http://zez.org/article/articleview/2/ there's
> a nice article on QCanvas, but it's in C++. Not too difficult to
> translate, though.

I followed the basic design of the program on zez.org but it gives an
error whenever i try to call QCanvasText.show() on a qcanvastext object.
Also, python pops up a MSVC runtime lib error.  If I change the object to
an instance of QCanvasSprite to follow the example program exactly, a
page fault occurs in QT221.DLL

//ERROR WINDOW:
Runtime Error!
Program C:\dev\python\python.exe

R6025
-pure virtual function call


//ERROR:
QPainter::begin: Another QPainter is already painting this device;
        A paint device can only be painted by one QPainter at a time
QPainter::setWorldMatrix: Will be reset by begin()
QPainter::setWorldXForm: Will be reset by begin()
QPainter::begin: Another QPainter is already painting this device;
        A paint device can only be painted by one QPainter at a time
QPainter::setWorldMatrix: Will be reset by begin()
QPainter::setWorldXForm: Will be reset by begin()
QPainter::setClipRegion: Will be reset by begin()
QPainter::setClipping: Will be reset by begin()
QPainter::setPen: Will be reset by begin()
QPainter::setBrush: Will be reset by begin()
QPainter::setBrush: Will be reset by begin()
QPainter::setPen: Will be reset by begin()






More information about the PyQt mailing list