Results 1 to 3 of 3

Thread: QTreeWidgetItem 's setText Multiline and Multifontsize in one treeitem

  1. #1
    Join Date
    May 2007
    Posts
    110
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X

    Default QTreeWidgetItem 's setText Multiline and Multifontsize in one treeitem

    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
    Attached Images Attached Images

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: QTreeWidgetItem 's setText Multiline and Multifontsize in one treeitem

    See the delegate classes.

  3. #3
    Join Date
    May 2007
    Posts
    110
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: QTreeWidgetItem 's setText Multiline and Multifontsize in one treeitem

    HI

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

    Thanks

Similar Threads

  1. Multiline in QAction text
    By skimpax in forum Qt Programming
    Replies: 5
    Last Post: 15th October 2009, 17:58
  2. About TreeModel and TreeItem?
    By yangyunzhao in forum Qt Programming
    Replies: 2
    Last Post: 14th August 2009, 07:25
  3. Multiline QCombobox
    By tyrdal in forum Qt Programming
    Replies: 1
    Last Post: 15th June 2009, 18:37
  4. Multiline QPushButton
    By uestebanez in forum Qt Programming
    Replies: 4
    Last Post: 12th October 2008, 21:25
  5. QTableView multiline problem
    By ramazangirgin in forum Qt Programming
    Replies: 3
    Last Post: 3rd August 2007, 10:02

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.