Using a stylish gradient in a QGraphicsItem
-
-
-
Is that part of the designer in QtCreator? Or is that a QML thing?
-
@AndyBrice
hi
its in Designer
Right click any widget, Change style sheet, Add Gradient (choose some color)
then Edit or New to open editor. -
Thanks. I'm thinking perhaps I need a radial gradient.
-
@AndyBrice
You can drag the handles to make it turn any way you want. -
Thanks.
On investigating a bit more it looks like the nice bitmaps above are a linear gradient, but with multiple 'stops' and some dithering. Might be quite difficult to do with QPainter calls. Perhaps I need to take a small vertical slice and tile that across the rectangle.
-
@AndyBrice
Hi
Im not sure about what part you want to draw with gradient as
for me- the difference between the pic 1n pic 2 is the use of
drop shadow on the buttons so they are not so flat looking. -
I think it is the dithering more than the drop shadow that makes it look pretty. But I'm not a graphic designer, so I am not 100% sure. ;0)
-
4/11