Results 1 to 3 of 3

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

Threaded View

Previous Post Previous Post   Next Post Next Post
  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

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
  •  
Qt is a trademark of The Qt Company.