Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-44743

QML scenegraph asserts when a Text element is given an image with size specified as "px"

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.5.0 Alpha
    • 5.3.2
    • Quick: SceneGraph
    • None
    • Win'7 x64, Digia Qt 5.3.2 from a binary distribution (commercial version)
    • ac4dcc585f4fb02b9b04867c75a883e4ad23693e

    Description

      Removing "px" fixes the issue, example (code has to be loaded from an application linking to debug versions of Qt libraries):

      import QtQuick 2.0
      
      Item {
          width: 300
          height: 200
      
          Text {
              anchors.centerIn: parent
              textFormat: Text.RichText
      
              //this asserts:
              //  ASSERT: "!m_targetRect.isEmpty()" in file scenegraph\qsgdefaultimagenode.cpp, line 334
              text: '<img src="http://store.qt.io/Global/About%20Us/Qt_master_logo_CMYK_300dpi.png" align="left" width="50px"/>'
      
              //This works (no "px" specified for width):
              //text: '<img src="http://store.qt.io/Global/About%20Us/Qt_master_logo_CMYK_300dpi.png" align="left" width="50"/>'
          }
      }
      

      Seems related to https://bugreports.qt.io/browse/QTBUG-35656

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            vmoolle Vladimir Moolle
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes