[resolved] How to display a string in different font size
Hi, I want to display a string in QGraphicsScene in different font size, eg. "100mph". I can achieve that by putting each piece in a different string. For simplicity, is there any way to display it in a single string?
QGraphicsTextItem *txt = new QGraphicsTextItem; txt->setHtml("<font size=\"6\">100</font><I>mph</I>"); scene->addItem(txt);
Hi p3c0, Thank you very much. Your method works well.