qlineargradient in toolbar not working
Brigggi opened this issue · 2 comments
Brigggi commented
I want to have a qlineargradient for the QGIS toolbar.
But if I load a QSS file with the following code, the top toolbar is getting black while the bars below Browser and Layer get the desired gradient.
QToolBar {
background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #0077B6 stop:1 #80CDEC);
}
Is this a bug or am I doing something wrong?
Using a simple color, all bars work fine:
QToolBar {
background-color: #80CDEC;
}
All4Gis commented
funny, if you just change only the background color it doesn't work but if you add some change the border as well it works too. Why? I honestly don't know
QToolBar {
border: 1px transparent #393838;
background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #0077B6 stop:1 #80CDEC);
}
Brigggi commented
Thank you, that solved my problem! :)