Results 1 to 6 of 6

Thread: Set an editable column for QTableView

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2011
    Posts
    64
    Thanks
    16
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Set an editable column for QTableView

    I am trying to avoid setData() because I have many things depend on widget. QTableView has no cellChanged() signal, how suppose I catch user modification in view?

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Set an editable column for QTableView

    You want to modify the data in the model, but you want to avoid setData()? Sorry, you've lost me. Using the model mechanisms is precisely the way you ensure that all views on the model stay in sync.

    By placing a delegate on the view you can intercept the attempt to write data back into the model, see QItemDelegate::setModelData().

Similar Threads

  1. QTableWidget, one column editable
    By stella1016 in forum Qt Programming
    Replies: 5
    Last Post: 11th July 2012, 09:35
  2. Make a column readonly/not editable in QTableView?
    By qlands in forum Qt Programming
    Replies: 3
    Last Post: 3rd August 2011, 10:44
  3. Replies: 3
    Last Post: 9th May 2011, 17:23
  4. Column Not Editable
    By waynew in forum Qt Programming
    Replies: 1
    Last Post: 1st August 2010, 01:43
  5. Editable QListView Column ??
    By darpan in forum Qt Programming
    Replies: 1
    Last Post: 3rd May 2006, 18:55

Tags for this Thread

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.