Search code examples
qmlqt-quick

Qt Quick (QML) color declaration


I have following statement inside ListView declaratation:

highlight: Rectangle { color: "lightsteelblue"; radius: 5 }

Everything is ok, but I was just wondering, which file in is word lightsteelblue declared, so I can review other predefined colors?


Solution

  • The documentation says it is normally specified as an SVG color name, and provides this reference page. I understand QML supports the different keyword names listed in there.

    EDIT: as pointed out by @dbrianj (thanks), you can find them in the qtbase/src/gui/painting/qcolor_p.cpp file.