summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems/qmlgraphicsimage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/graphicsitems/qmlgraphicsimage.cpp')
-rw-r--r--src/declarative/graphicsitems/qmlgraphicsimage.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/declarative/graphicsitems/qmlgraphicsimage.cpp b/src/declarative/graphicsitems/qmlgraphicsimage.cpp
index fd220a3..938fe2a 100644
--- a/src/declarative/graphicsitems/qmlgraphicsimage.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicsimage.cpp
@@ -152,12 +152,18 @@ void QmlGraphicsImage::setPixmap(const QPixmap &pix)
Q_D(QmlGraphicsImage);
if (!d->url.isEmpty())
return;
- d->pix = pix;
+ d->setPixmap(pix);
+}
+
+void QmlGraphicsImagePrivate::setPixmap(const QPixmap &pixmap)
+{
+ Q_Q(QmlGraphicsImage);
+ pix = pixmap;
- setImplicitWidth(d->pix.width());
- setImplicitHeight(d->pix.height());
+ q->setImplicitWidth(pix.width());
+ q->setImplicitHeight(pix.height());
- update();
+ q->update();
}
/*!