no, this is just example, i copied style from QtDesigner and loose brace pasting into browser
as i said, i tried everything, without selector (i. e. without "* {" and "}"), with "QLabel" and "*".
here, compilable example:
#include <QApplication>
#include <QLabel>
int main(int argc, char *argv[])
{
QApplication app(argc,argv);
QLabel mpExampleLabel("Cell text example");
mpExampleLabel.setFrameStyle(QFrame::Box);
mpExampleLabel.setAlignment(Qt::AlignHCenter|Qt::A lignVCenter);
mpExampleLabel.setStyleSheet("* {color: qlineargradient(spreadad, x1:0 y1:0, x2:1 y2:0, stop:0 rgba(0, 0, 0, 255), stop:1 rgba(255, 255, 255, 255));}");
mpExampleLabel.show();
return app.exec();
}
i always have a label with white text! (i. e. text color will be always the color of last stop of any gradient). what am i do wrong?
Bookmarks