Results 1 to 4 of 4

Thread: How to know when field is edited within QTableView

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to know when field is edited within QTableView

    For simple uses you might just connect to the activated() signal of the view, but be warned, that it'll not handle all possible situations. It depends which edit triggers you use.

  2. #2
    Join Date
    Mar 2006
    Posts
    7
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: How to know when field is edited within QTableView

    For completeness, emitting a signal from a const method:

    Qt Code:
    1. void MyItemDelegate::setEditorData(QWidget* editor, const QModelIndex& index) const
    2. {
    3. QItemDelegate::setEditorData(editor, index);
    4. emit const_cast<MyItemDelegate*>(this)->editBegins();
    5. }
    To copy to clipboard, switch view to plain text mode 

    http://lists.trolltech.com/qt-intere...ad01411-0.html

Similar Threads

  1. Set height of QTableView to fit exact number of rows.
    By Ben.Hines in forum Qt Programming
    Replies: 3
    Last Post: 17th January 2019, 01:49
  2. QTableView sorting
    By gabriels in forum Qt Programming
    Replies: 11
    Last Post: 6th October 2010, 17:13
  3. QTableView currentChanged <> selecting header
    By Everall in forum Qt Programming
    Replies: 4
    Last Post: 1st April 2009, 08:24
  4. QTableView paints too much
    By Jimmy2775 in forum Qt Programming
    Replies: 2
    Last Post: 26th July 2006, 18:42
  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.