diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-04-24 01:18:54 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-04-24 01:18:54 (GMT) |
commit | 19a507c5cc8c178a0e00fa302f6315c4b18b50a5 (patch) | |
tree | 9087a081878c157e8ced4af9b3062679486453d8 | |
parent | 728e1e1c3678768aafeb07ebe8e17dd2fbf047b2 (diff) | |
download | Qt-19a507c5cc8c178a0e00fa302f6315c4b18b50a5.zip Qt-19a507c5cc8c178a0e00fa302f6315c4b18b50a5.tar.gz Qt-19a507c5cc8c178a0e00fa302f6315c4b18b50a5.tar.bz2 |
Ensure -ve z stacks behind parent when using GraphicsView
-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; |