diff options
-rw-r--r-- | qt-ui/profile/divepixmapitem.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/qt-ui/profile/divepixmapitem.cpp b/qt-ui/profile/divepixmapitem.cpp index 215ce99c2..4405195da 100644 --- a/qt-ui/profile/divepixmapitem.cpp +++ b/qt-ui/profile/divepixmapitem.cpp @@ -3,6 +3,7 @@ #include <QPen> #include <QBrush> +#include <QGraphicsDropShadowEffect> DivePixmapItem::DivePixmapItem(QObject *parent) : QObject(parent), QGraphicsPixmapItem() { @@ -22,6 +23,15 @@ void DivePictureItem::setPixmap(const QPixmap &pix) rect->setPen(Qt::NoPen); rect->setBrush(QColor(Qt::white)); rect->setFlag(ItemStacksBehindParent); + rect->setZValue(-1); + + QGraphicsRectItem *shadow = new QGraphicsRectItem(rect->boundingRect(), this); + shadow->setPos(5,5); + shadow->setPen(Qt::NoPen); + shadow->setBrush(QColor(Qt::lightGray)); + shadow->setFlag(ItemStacksBehindParent); + shadow->setZValue(-2); + setTransformOriginPoint(boundingRect().width()/2, boundingRect().height()/2); } |