I trying to set gradient color for QLabel text. I am trying to use setStyleSheet function but it doesn't work. I read this article but still can't get the working solution.
this is my code
void MyClass::setTitle(const QString& text)
{
m_text = text;
m_titleText->setText(text);
QFont font = m_titleText->font();
font.setPointSize(12);
m_titleText->setFont(font);
m_titleText->setStyleSheet("color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, #3d5afe: 0 #66e, stop: 1 #fd3e7f);")
}
Is there any solution for this problem? Thanks advance.
