Results 1 to 2 of 2

Thread: Editable QTreeView

  1. #1
    Join Date
    Oct 2008
    Posts
    29
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Editable QTreeView

    I've just finished the "Simple Tree Model" example. What would be the best way of altering this to allow the user to modify the tree?

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Editable QTreeView

    To enable editing in TreeModel, you must implement setData(), and modify flags() to return Qt::ItemIsEditable together with other necessary flags.
    J-P Nurmi

Similar Threads

  1. Direct root childs inline QTreeView
    By faraslacks in forum Qt Programming
    Replies: 2
    Last Post: 15th January 2009, 07:45
  2. QDirModel and QTreeView cut and paste
    By Micawber in forum Qt Programming
    Replies: 4
    Last Post: 28th May 2008, 20:16
  3. QTreeView rows editable
    By Pesho in forum Qt Programming
    Replies: 5
    Last Post: 13th September 2007, 13:19
  4. QTreeView help
    By bepaald in forum Qt Programming
    Replies: 1
    Last Post: 15th August 2007, 21:22
  5. background image in QTreeView
    By momesana in forum Qt Programming
    Replies: 2
    Last Post: 11th January 2007, 06:25

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.