Yaa actually I had two strings eg. "String1" and "String2" I had inserted these strings in a QTreeWidget
item1->setText(0,"String1");
tem1->setFont(0,font1);
item2->setText(0,"String2");
tem1->setFont(0,font2);
QTreeWidget *treeWidget = new QTreeWidget(this);
QTreeWidgetItem *item1 = new QTreeeWidgetItem(treeWidget);
item1->setText(0,"String1");
tem1->setFont(0,font1);
QTreeWidgetItem *item2 = new QTreeeWidgetItem(item1);
item2->setText(0,"String2");
tem1->setFont(0,font2);
To copy to clipboard, switch view to plain text mode
The output is:
String1
String2
String1 is the parent of String2 and treeWidget is parent of String1
But I want both the strings should be of the same parent, but should be split and with the different fonts. That I had shown in the Attached file.
Bookmarks