diff options
author | Matthew Vogt <matthew.vogt@nokia.com> | 2012-07-05 16:09:27 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-07-11 17:37:55 +0200 |
commit | b5eb3d69b40c4b750a1bbece7be2acbe7cf918e3 (patch) | |
tree | f4009d3023d0fa9a511e94e8cc145c222c3b7552 /src/qml/doc | |
parent | aeb2b05e3cad95164779e8778351b492b0e2fffa (diff) |
Allow color to be explicitly compared to a string
Add the Qt.colorEqual() function which compares any combination of
two supplied color and string arguments, by converting the string
arguments to colors as necessary.
Task-number: QTBUG-18754
Change-Id: I75baef9a2edd30a5f8b9cb5e151e4adba6f6a371
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Diffstat (limited to 'src/qml/doc')
-rw-r--r-- | src/qml/doc/src/typesystem/basictypes.qdoc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/qml/doc/src/typesystem/basictypes.qdoc b/src/qml/doc/src/typesystem/basictypes.qdoc index 94ff682ee3..0f30a8af13 100644 --- a/src/qml/doc/src/typesystem/basictypes.qdoc +++ b/src/qml/doc/src/typesystem/basictypes.qdoc @@ -293,6 +293,7 @@ property is only invoked when the property is reassigned to a different object v \qmlbasictype color \ingroup qmlbasictypes \brief an ARGB color value. + \target qmlbasictypecolor The \c color type refers to an ARGB color value. It can be specified in a number of ways: @@ -326,6 +327,10 @@ property is only invoked when the property is reassigned to a different object v } \endqml + To test color values for equality, use the \l{QML:Qt::colorEqual()}{Qt.colorEqual()} + function. This allows colors to be accurately compared whether they are in property + form or in any of the acceptable string specification forms. + When integrating with C++, note that any QColor value \l{qtqml-cppintegration-data.html}{passed into QML from C++} is automatically converted into a \c color value, and vice-versa. |