Qt-interest Archive, June 2007
Gradient and getColor ?
Message 1 in thread
Hello,
I see that the QGradient class contain the following function :
void *setColorAt <http://doc.trolltech.com/4.1/qgradient.html#setColorAt>* (
qreal *position*, const QColor & *color* )
I wonder if, after defining 2 colors for example
myGradient.setColorAt(0, Qt:red);
myGradient.setColorAt(1, Qt:yellow);
it is possible to get the color of a point
with a value of 0.5 for example
something like
myGradient.getColor(0.5);
which will return a QColor
or maybe there is a better way to do something like that
Regards