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

QML Debugger Console shows wrong values for color object

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.15.0 Beta1
    • 5.12.7, 5.13.2, 5.14.1
    • QML: Tooling
    • Ubuntu 18.04 LTS 64 bit
      Qt 5.14.1
    • 751e92d50a23d1273af42a7a7836bb2eb336eced (qt/qtdeclarative/5.15)

    Description

      1. Create a new Qt Quick UI Prototype project using the wizard.
      2. Open the project's qml file.
      3. Inside the Window item, add the following lines:
            Rectangle {
                color: "green"
            }
        
      4. Configure the project to run on a current version of Qt.
        With Qt 5.6, this still seems to work correctly. With Qt 5.10.1 and Qt 5.14.1, I could reproduce the bug.
      5. Start debugging this project.
      6. In the Locals view, select the Rectangle item.
      7. In the QML Debugger Console, enter "color".
        The console will show a tree view representing the color object.
      8. Expand that tree view.
        Among others, you'll see the values:
        b 1
        g 1
        r 1

        This has nothing to do with green.

      The Locals view correctly shows "#008000". When using a Window item instead of a Rectangle, also the QML Debugger Console will show correct values.

      Attachments

        Issue Links

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

          Activity

            People

              ulherman Ulf Hermann
              rlohning Robert Löhning
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes