Not able to set color and variable to Qt SetText (Solved)
-
I could
ui->label->setText(StationList[1]);
but i could not set color and variable to Qt SetText.
Not able to do it for many hours.QColor color = cyan; QString Text; QString fonttemplate = tr("<font color='%1'> %2</font>"); //ui->labelCurrentStation->setText("<font color='cyan'> Talad </font>"); ui->labelCurrentStation->setText(fonttemplate.arg(cyan,Text));