PDA

View Full Version : QTreeWidgetItem 's setText Multiline and Multifontsize in one treeitem



santosh.kumar
18th September 2010, 13:26
Hi

For my applications need Kindly see the attatchment.
Highlighted in one QTreeWidgetItem that show Two line text in one QTreeWidgetItem.
But first line contains in Bold and large font size , second line contains small font size.

I am using like this


QString str = "Applications";
str += "/Applications/Sofwtare/MyApp.app/Contents/MacOS/MyApp";

QTreeWidgetItem *item = new QTreeWidget(treeWidget);
item->setText(0,str);

Here I want first line "Applications" should show in large font size (14) and second "/Applications/Sofwtare/MyApp.app/Contents/MacOS/MyApp" should show small font size(12).

Which class we have to used for this.
If anybody know plz tell me.

Thanks
Santosh

Lykurg
18th September 2010, 13:50
See the delegate classes.

santosh.kumar
18th September 2010, 14:02
HI

I m also using StyleSheet for QTreeWidget. As u told Delegate classes. which class i have to use for this and how.

Thanks