Results 1 to 2 of 2

Thread: Editable cells in QTableView

  1. #1
    Join Date
    Jun 2006
    Location
    Sweden
    Posts
    99
    Thanks
    11
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Editable cells in QTableView

    I'm working with a QTableView and a QStandardItemModel and would like to make only certain cells editable. Is there any way of doing this? Modifying the EditTriggers seems to give me all or nothing which is a bit too coarse for my taste.

    Thanks in advance.

  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 cells in QTableView

    Either override QAbstractItemModel::flags() or in case you use QStandardItems you may use QStandardItem::setFlags() (QStandardItem was introduced in Qt 4.2).
    J-P Nurmi

Similar Threads

  1. QTableView currentChanged <> selecting header
    By Everall in forum Qt Programming
    Replies: 4
    Last Post: 1st April 2009, 08:24
  2. Paging a QTableView
    By Jimmy2775 in forum Qt Programming
    Replies: 3
    Last Post: 6th November 2006, 17:54
  3. QTableView paints too much
    By Jimmy2775 in forum Qt Programming
    Replies: 2
    Last Post: 26th July 2006, 18:42
  4. QTableView versus QTableWidget
    By jcr in forum Qt Programming
    Replies: 2
    Last Post: 24th May 2006, 19:51
  5. Multi-line messages in QTableView
    By Conel in forum Qt Programming
    Replies: 6
    Last Post: 13th April 2006, 13:49

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.