Hi,

Im trying to accomplish something that I think is quite easy but I can't figure out how to use the gradients in the right way. What I'm trying to do is style a QPushButton background with stylesheets so it looks like the image below.

This is what I want:



This is the code I'm using but I never get the sharp line in the middle, it just fade over..
Qt Code:
  1. background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 0.5, x3: 0 y3: 1,
  2. stop: 0 #ABCD44, stop: 0.5 #ABCD44,
  3. stop: 0.5 #A1C72E, stop: 1.0 #9CC322);
To copy to clipboard, switch view to plain text mode 

I know I'm just doing something wrong when building the style but I'm not totally sure how to use the gradients.. Thanks!