[Qt-qml] QML and graphics item caching
alexis.menard at nokia.com
alexis.menard at nokia.com
Sun Sep 5 19:40:54 CEST 2010
On Sep 3, 2010, at 5:05 PM, ext Adriano Rezende wrote:
>> the screen on each frame of the animation. Doesn't setting
>> QGraphicsItem::NoCache do exactly this (blit a cached bitmap instead
>> of calling draw on each child item)?
>
> No, ItemCoordinateCache only caches the item, not it's children.
You can use the QGraphicsEffect to achieve sub-tree caching...It's a bit "borderline"
with an extra paint but it works.
http://websvn.kde.org/trunk/playground/base/plasma/shells/mobile/shell/plasmaapp.cpp?revision=1169053&view=markup
show how i did in Plasma-Mobile
>
>> Can I hint a QML Item element to temporarily cache itself for the
>> duration of the transition? Or should I derive a C++ class from
>> QDeclarativeItem that has a method to take a 'screenshot' of a QML
>> element and move an instance of it around when I need to scroll the
>> view?
>
> AFAIK cacheMode is not exposed in QML side. But for what you want
> there is not official support even in QGraphicsView side.
> There was an idea to implement a DeepItemCacheMode that would do
> exactly this, but it was forgotten and never saw the daylight.
Yes was too complex...
>
> I think this would be a great feature also. You could set a complex
> element into a frozen state to do more fancy transformations without
> having to apply transformations in each child behind the scenes.
>
> Br,
> Adriano
> _______________________________________________
> Qt-qml mailing list
> Qt-qml at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-qml
More information about the Qt-qml
mailing list