How to create meshGradient (2-dimensional gradient)?
Unsolved
General and Desktop
-
Some linearGradient code (1-dim) , but meshes (2-dim, example below) are needed.
QLinearGradient linearGrad(screen.topLeft(), screen.bottomRight()); QColor c1 = QColor::fromHsvF(0.3, 1, 0.3); QColor c2 = QColor::fromHsvF(0.4, 1, 0.5); QColor c3 = QColor::fromHsvF(0.5, 1, 0.3); linearGrad.setColorAt(0.1, c1); linearGrad.setColorAt(0.5, c2); linearGrad.setColorAt(0.9, c3); myscene->setBackgroundBrush(QBrush(linearGrad));
mesh examples:
How to create mesh-gradient-background for scene?