/****************************************************************************
**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
**
** This file is part of the QtDeclarative module of the Qt Toolkit.
**
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
#include <QPainter>
#include <QStringBuilder>
#include <QtCore/qmath.h>
+#include <QtWidgets/qdrawutil.h>
QT_BEGIN_NAMESPACE
with red, blending to yellow at one third of the height of the rectangle,
and ending with green:
- \snippet doc/src/snippets/declarative/gradient.qml code
+ \snippet doc/src/snippets/qtquick1/gradient.qml code
\clearfloat
\section1 Performance and Limitations
/*!
\qmlproperty list<GradientStop> QtQuick1::Gradient::stops
+ \default
+
This property holds the gradient stops describing the gradient.
By default, this property contains an empty list.
The following example shows the effects of some of the common properties on a
Rectangle item, which in this case is used to create a square:
- \snippet doc/src/snippets/declarative/rectangle/rectangle.qml document
+ \snippet doc/src/snippets/qtquick1/rectangle/rectangle.qml document
\clearfloat
\section1 Performance
\inlineimage rect-border-width.png
\enddiv
- \snippet doc/src/snippets/declarative/rectangle/rect-border-width.qml 0
+ \snippet doc/src/snippets/qtquick1/rectangle/rect-border-width.qml 0
\clearfloat
Here, the innermost rectangle's border is clipped on the bottom and right edges by its
\inlineimage declarative-rect_gradient.png
\enddiv
- \snippet doc/src/snippets/declarative/rectangle/rectangle-gradient.qml rectangles
+ \snippet doc/src/snippets/qtquick1/rectangle/rectangle-gradient.qml rectangles
\clearfloat
If both a gradient and a color are specified, the gradient will be used.
The following example shows rectangles with colors specified
using hexadecimal and named color notation:
- \snippet doc/src/snippets/declarative/rectangle/rectangle-colors.qml rectangles
+ \snippet doc/src/snippets/qtquick1/rectangle/rectangle-colors.qml rectangles
\clearfloat
If both a gradient and a color are specified, the gradient will be used.