Results 1 to 4 of 4

Thread: how to get notified when a new row is added into a QTableView ?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2013
    Posts
    6
    Thanks
    1
    Thanked 3 Times in 3 Posts

    Smile how to get notified when a new row is added into a QTableView ?

    hi,
    i need to do some operation to every row of a QTableView, but the number of rows is varying from time to time, thus i need to get notified when row count changes in a QTableView?
    how can i do that ?

    i tried the following, but 'rowCountChanged' is never called.

    class TableView : public QTableView
    {
    Q_OBJECT

    public:

    TableView(QWidget *parent = 0) : QTableView(parent)
    {

    }

    protected Q_SLOTS:

    void rowCountChanged(int oldCount, int newCount)
    {
    /// CP1
    }
    };
    Last edited by aresa; 21st October 2013 at 09:09.

Similar Threads

  1. How to be notified on dragEnterEvent?
    By tuxit in forum Qt Quick
    Replies: 6
    Last Post: 12th August 2011, 12:29
  2. Replies: 1
    Last Post: 28th October 2010, 22:36
  3. Replies: 2
    Last Post: 27th October 2010, 11:23
  4. How to be notified when a child changes?
    By mooreaa in forum Qt Programming
    Replies: 1
    Last Post: 3rd July 2008, 13:04
  5. Data not being added to my QTableView?
    By steg90 in forum Qt Programming
    Replies: 1
    Last Post: 20th November 2007, 14:20

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.