diff --git a/src/declarativeimports/core/framesvgitem.cpp b/src/declarativeimports/core/framesvgitem.cpp --- a/src/declarativeimports/core/framesvgitem.cpp +++ b/src/declarativeimports/core/framesvgitem.cpp @@ -558,7 +558,7 @@ if (m_sizeChanged) { FrameNode* frameNode = static_cast(oldNode); - QSize frameSize(width(), height()); + QSize frameSize(int(qMax(width(), 0.0)), int(qMax(height(), 0.0))); QRect geometry = frameNode->contentsRect(frameSize); QSGNode *node = oldNode->firstChild(); while (node) { @@ -581,7 +581,7 @@ if ((m_textureChanged || m_sizeChanged) || textureNode->texture()->textureSize() != m_frameSvg->size()) { QImage image = m_frameSvg->framePixmap().toImage(); textureNode->setTexture(s_cache->loadTexture(window(), image)); - textureNode->setRect(0, 0, width(), height()); + textureNode->setRect(0, 0, qMax(width(), 0.0), qMax(height(), 0.0)); m_textureChanged = false; m_sizeChanged = false; @@ -603,7 +603,7 @@ CheckMarginsChange checkFixedMargins(m_fixedMargins); QQuickItem::componentComplete(); - m_frameSvg->resizeFrame(QSize(width(), height())); + m_frameSvg->resizeFrame(QSizeF(width(), height())); m_frameSvg->setRepaintBlocked(false); m_textureChanged = true; }