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

QVariant property causes 'QColor::setNamedColor: Unknown color' warning

    XMLWordPrintable

Details

    • a423ff5474b89028eeca95b254f5184311c8223b

    Description

      When a string is assigned in QML to a C++ side QVariant property, one sees QColor::setNamedColor: Unknown color warning.

      This happens because the string is attempted to be converted to a color in QDeclarativeStringConverters::variantFromString().

      This causes problems when debugging other problems with QT_FATAL_WARNINGS=1. And also makes the developer wonder if there is some bug in his code.

      Attachments

        1. main.qml
          0.1 kB
        2. main.cpp
          0.6 kB

        Issue Links

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

          Activity

            People

              rodal Samuel Rødal
              girish Girish Ramakrishnan
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes