diff options
-rw-r--r-- | src/declarative/canvas/qsimplecanvasitem.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/declarative/canvas/qsimplecanvasitem.cpp b/src/declarative/canvas/qsimplecanvasitem.cpp index 7d9f61c..95f7623 100644 --- a/src/declarative/canvas/qsimplecanvasitem.cpp +++ b/src/declarative/canvas/qsimplecanvasitem.cpp @@ -443,7 +443,16 @@ void QSimpleCanvasItem::setZ(qreal z) return; if(d->graphicsItem) { + + if(z < 0) + d->graphicsItem->setFlag(QGraphicsItem::ItemStacksBehindParent, + true); + else + d->graphicsItem->setFlag(QGraphicsItem::ItemStacksBehindParent, + false); + d->graphicsItem->setZValue(z); + } else { if(d->data()->z == z) return; |