[PyQt] Unable to get QDeclarativeImageProvider to work

Phil Thompson phil at riverbankcomputing.com
Fri Dec 17 21:42:24 GMT 2010


On Wed, 15 Dec 2010 15:38:24 -0700, "Brett Stottlemyer"
<brett at stottlemyer.com> wrote:
> All,
> 
> I am unable to get QDeclarativeImageProvider working.  When I run the
> attached code (on Win7) with 
>> python qmltest.py
> it locks up and I get a "python has stopped responding" message.
> 
> Is this a bug?  It looks like the size parameter (in C++) is a pointer
that
> is populated internally and returned.  The only other example like this
> that
> I am aware of is winEvent, where you are supposed to return a tuple
instead
> of a single parameter.
> 
> All this example is supposed to do is mimic the documentation
>
(http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qdeclarativeimag
> eprovider.html), but in Python.  This is 4.8.1 pyqt and Python 2.6, btw.
> I've gotten other QML examples to work.

You need to keep an explicit reference to your image providers to stop
them being garbage collected prematurely.

Phil


More information about the PyQt mailing list