Results 1 to 3 of 3

Thread: Editable Tree Model Example and a QTreeView using icons

  1. #1
    Join Date
    Apr 2010
    Posts
    2
    Thanks
    1
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Editable Tree Model Example and a QTreeView using icons

    Hi,
    I'm using Qt 4.6 and I've inherited some classes (TreeItem TreeModel) declared in:
    http://doc.trolltech.com/4.6/itemvie...treemodel.html

    The question is: how can I visualize icons using a QTreeView and the model described above?
    Thanks in advance!

    xael

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Editable Tree Model Example and a QTreeView using icons

    Return icon for Qt:: DecorationRole from the model's data function.

  3. The following user says thank you to aamer4yu for this useful post:

    xael (21st April 2010)

  4. #3
    Join Date
    Apr 2010
    Posts
    2
    Thanks
    1
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: Editable Tree Model Example and a QTreeView using icons

    Thanks for your answer ! I solved the problem and I made a step forward in understanding the Qt implementation of the MVC pattern

    xael

Similar Threads

  1. Editable QTreeView
    By winston2020 in forum Qt Programming
    Replies: 1
    Last Post: 23rd January 2009, 13:18
  2. QSql*Model + QTreeView : make a tree
    By punkypogo in forum Qt Programming
    Replies: 18
    Last Post: 24th October 2008, 18:14
  3. Tree View with Icons/primitives
    By dosto.walla in forum Qt Programming
    Replies: 2
    Last Post: 3rd October 2008, 10:29
  4. Editable Tree Model
    By kloffy in forum Qt Programming
    Replies: 5
    Last Post: 10th October 2007, 15:49
  5. QTreeView rows editable
    By Pesho in forum Qt Programming
    Replies: 5
    Last Post: 13th September 2007, 13:19

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.