def create_gradient(base_color, stop=QPointF(0, 0), finalStop=QPointF(0, 1)):
 grad = QLinearGradient(stop, finalStop)
 grad.setStops([(0.0, base_color), (0.5, base_color), (0.8, base_color.darker(105)), (1.0, base_color.darker(110))])
 grad.setCoordinateMode(QLinearGradient.ObjectBoundingMode)
 return grad

def create_gradient ( base_color , stop = QPointF ( 0 , 0 ) , finalStop = QPointF ( 0 , 1 ) ) : grad = QLinearGradient ( stop , finalStop ) grad . setStops ( [ ( 0.0 , base_color ) , ( 0.5 , base_color ) , ( 0.8 , base_color . darker ( 105 ) ) , ( 1.0 , base_color . darker ( 110 ) ) ] ) grad . setCoordinateMode ( QLinearGradient . ObjectBoundingMode ) return grad
create a default linear gradient using base_color .