Hello. As in Qlable you can display the text as it appears in the picture: enter image description here

In this case, "aaaaaa", "bbbbb" and "sssss" we obtain from variables. I tried using label->setSelection(i, j) , as well as the pseudo-state :selected but nothing label->setSelection(i, j) .

    1 answer 1

    Use HTML tags:

     label->setText("aaaaaa<FONT SIZE=5 COLOR=#FF0000>bbbbb</FONT>ccccc");