Hello. As in Qlable you can display the text as it appears in the picture: 
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) .