Results 1 to 2 of 2

Thread: QAbstractTableModel::data not being called...

  1. #1
    Join Date
    May 2007
    Posts
    301
    Thanks
    46
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default QAbstractTableModel::data not being called...

    Hi,

    I've updated to Qt 4.3 from 4.2.3 and now find that my custom table model data function is not being called, whether this is just coincidence I don't know?

    I am calling emit layoutChanged() which use to call the data(const QModelIndex &index, int role) function. I'm not sure now why this has stopped working

    Any advice is much appreciated,

    Regards,
    Steve

  2. #2
    Join Date
    May 2007
    Posts
    301
    Thanks
    46
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QAbstractTableModel::data not being called...

    I got this working by adding the following lines :

    Qt Code:
    1. int row = theApp->m_dcb.GetSignalList()->count();
    2. beginInsertRows(QModelIndex(), row, row );
    3. endInsertRows();
    To copy to clipboard, switch view to plain text mode 

    Previously I didn't have to do this, the layoutChanged signal had worked fine, it is only since moving to Qt 4.3 from 4.2.3 this has happened?

    Regards,
    Steve

Similar Threads

  1. Drag and Drop, dropEvent not being called?
    By steg90 in forum Qt Programming
    Replies: 36
    Last Post: 22nd May 2007, 07:03
  2. Replies: 8
    Last Post: 1st May 2007, 22:35
  3. Replies: 4
    Last Post: 10th March 2007, 18:01
  4. Replies: 3
    Last Post: 20th February 2007, 13:02
  5. QWidget::paintEngine() should no longer be called
    By Greeny in forum Qt Programming
    Replies: 7
    Last Post: 7th February 2007, 10:12

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.