Hello,
If someone could help me with getting a gradient in the background of a button, I'd appreciate it.
I would expect the following code to make the button's background be a gradient from red to white vertically from the top of the button to the bottom.
Code:
linearGrad.setColorAt(0, Qt::red); linearGrad.setColorAt(1, Qt::white); b->setPalette(palette);
All it does, though, is make the button black. Since it makes the button black, I know that I am successfully changing the palette and reapplying it, but I'm just not changing it in the right way.
Any help would be great.
Thanks,
Derek