[Qt-qml] Problem with BorderImage & QDeclarativeImageProvider (4.7.1)
Timo.Rouvinen at nokia.com
Timo.Rouvinen at nokia.com
Thu Dec 23 11:04:19 CET 2010
Hello!
I've implemented an image provider (requestPixmap()) and trying to use QML BorderImage with it. Everything works otherwise OK except that the requestedSize is always -1,-1. My BorderImage does have width and height set, and additionally I've also tried setting the sourceSize but still the requestedSize coming to the image provider is always invalid.
Debugging the problem further I noticed the qdeclarativeborderimage.cpp calls load like this:
d->pix.load(qmlEngine(this), d->url, d->async);
So it calls the version that doesn't give any size to the load() method... I tried changing the load to have the sourceSize as a parameter (and built Qt Declarative):
d->pix.load(qmlEngine(this), d->url, d->sourcesize, d->async);
.. then it seemed to work as expected.
BorderImage documentation does not mention the sourceSize as a property whereas QML Image does... Should the QML BorderImage use the sourceSize property similarly as QML Image does?
Br,
Timo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20101223/1f8786f7/attachment.html
More information about the Qt-qml
mailing list