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

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

XMLWordPrintable

    • a423ff5474b89028eeca95b254f5184311c8223b

      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.

        1. main.cpp
          0.6 kB
        2. main.qml
          0.1 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes