QSS question. It is possible to set gradients for widgets. Gradients are defined through Qt-snyh gradient classes. Question on qss syntax:

background: QLinearGradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 rgba(0, 0, 0, 0), stop: 0.3 rgba(102, 181, 255, 200), stop: 1 rgba(102, 181, 255, 255)); 

Creating a linear gradient with the vector 0; 1. This style is taken from the example, the actual question is, what are the stop parameters and in what range are their values โ€‹โ€‹(0..1?), I would like a link to the documentation, I myself somehow did not find

  • one
    In truth, QSS is just a gray similarity to CSS , so you have to be careful, there are a lot of properties and settings that are not in line with CSS . - timob256
  • one
    @ timob256, well, like gray) from cross-platform with s ++ is very bright, but I agree with you, many of the documented features do not work as you expect) - goldstar_labs

1 answer 1

The use of gradients, in QSS, is described here: http://doc.qt.io/qt-5/stylesheet-reference.html#gradient . Unfortunately, this is all documentation on gradients.

Yes, the values โ€‹โ€‹of the stop coordinate should lie on the segment [0., 1.], as indicated in http://doc.qt.io/qt-5/qgradient.html#setStops

  • Yes, I saw this dock, I thought there was something more, Thanks for the reply. - goldstar_labs