aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>2013-02-19 10:26:44 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-02-19 11:24:39 +0100
commit36ef4052e0018c396b42cdef950e80e2efce3778 (patch)
tree1434ad5d28660a2e2ad2ee4bc0cbd59798bf804e /src/quick/items
parent06378ac23a1f75b30da08cfa74b3e774aaba9298 (diff)
Fix embedding images in text elements
It seems that the the inner target rect has either been added recently or its default has been changed to something invalid, because we need to set it to the same as targetRect for the image to show up at all. Task-number: QTBUG-29560 Change-Id: I0fe6b7c5ab07afc780b8ea33a7ccc210861e0821 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Diffstat (limited to 'src/quick/items')
-rw-r--r--src/quick/items/qquicktextnode.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/quick/items/qquicktextnode.cpp b/src/quick/items/qquicktextnode.cpp
index 4d3f97adaf..5e1b20c032 100644
--- a/src/quick/items/qquicktextnode.cpp
+++ b/src/quick/items/qquicktextnode.cpp
@@ -1105,6 +1105,7 @@ void QQuickTextNode::addImage(const QRectF &rect, const QImage &image)
QSGTexture *texture = m_context->createTexture(image);
m_textures.append(texture);
node->setTargetRect(rect);
+ node->setInnerTargetRect(rect);
node->setTexture(texture);
appendChildNode(node);
node->update();