From b5eb3d69b40c4b750a1bbece7be2acbe7cf918e3 Mon Sep 17 00:00:00 2001 From: Matthew Vogt Date: Thu, 5 Jul 2012 16:09:27 +1000 Subject: 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 --- src/qml/doc/src/typesystem/basictypes.qdoc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/qml/doc') 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. -- cgit v1.2.3