[SOLVED]Vertical Gradient
-
wrote on 13 Jan 2011, 11:03 last edited by
I'm trying to put a gradient( from top to bottom ) to a QGraphicsRectItem but I managed to add it only from left to right:
@QLinearGradient gradient( 0, 0, rectWidth, rectHeight );
gradient.setColorAt( 0.0, "#EBEBEB");
gradient.setColorAt( 1.0, "#A3A3A3");
rectItem->setBrush( gradient );@How to do it right? Thanks!
-
wrote on 13 Jan 2011, 11:15 last edited by
Have you tried this:
@
QLinearGradient gradient( 0, 0, 0, rectHeight );
gradient.setColorAt( 0.0, "#EBEBEB");
gradient.setColorAt( 1.0, "#A3A3A3");
rectItem->setBrush( gradient );
@ -
wrote on 13 Jan 2011, 12:20 last edited by
Pfff..., so simple, thanks :)
1/3