QConicalGradient c(50,50,0); //圆心为(50,50),开始角度为0 c.setColorAt(0,Qt::green); c.setColorAt(1,Qt::white); QPainter p(this); p.setBrush(c); o.drawEllipse(0,0,100,100); //从圆心的0角度开始逆时针填充
锥形渐变