Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
how to get foreground color for string
Hi All...Kindly answer this
QineEdit * Layout->setText(txtSensor->text());
from the above code...i want to change the string color
Or by simply setting a stylesheet on the QLinEdit:
if two string eg: Qstring str1="welcome"; QString str2="hello"; are displayed in single Qlinedit..... output:welcome hello
here i want to change the color of the welcome and hello
What @raven-worx said:
does color the text?
u are right ...that came...hello should be in one color and world should be in different color
you must then format each word.
The link he provided shows a function to do so.
thanks i will try
got output i used Qfontmetrics to solve my problem