Results 1 to 2 of 2

Thread: Editable QTreeView

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

    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
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts

    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, 08:45
  2. QDirModel and QTreeView cut and paste
    By Micawber in forum Qt Programming
    Replies: 4
    Last Post: 28th May 2008, 21:16
  3. QTreeView rows editable
    By Pesho in forum Qt Programming
    Replies: 5
    Last Post: 13th September 2007, 14:19
  4. QTreeView help
    By bepaald in forum Qt Programming
    Replies: 1
    Last Post: 15th August 2007, 22:22
  5. background image in QTreeView
    By momesana in forum Qt Programming
    Replies: 2
    Last Post: 11th January 2007, 07: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
  •  
Qt is a trademark of The Qt Company.