Hi!
Use the exposedRect that a graphicsitem:aint function recieves. You will need to create an item for your background set its z order to a low number and implement your own caching method..
CustomItem::CustomItem()
{
// Need this for exposedRect to be initialized!
}
{
// Use the exposedRect
option->exposedRect ..
..
}
CustomItem::CustomItem()
{
// Need this for exposedRect to be initialized!
setFlag(QGraphicsItem::ItemUsesExtendedStyleOption,true);
}
void CustomItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{
// Use the exposedRect
option->exposedRect ..
..
}
To copy to clipboard, switch view to plain text mode
HIH
Johannes
Bookmarks