Does DATreeModel::setCanData() get called only once or many times? I think you might be looking for something like this:
void DATreeModel::setCanData( CANDATA *pData, int nAmount, int nCount )
{
if( pData )
{
int row = rowCount();
beginInsertRows
(QModelIndex(), row, row
+ nAmount
- 1);
...
endInsertRows();
}
}
void DATreeModel::setCanData( CANDATA *pData, int nAmount, int nCount )
{
if( pData )
{
int row = rowCount();
beginInsertRows(QModelIndex(), row, row + nAmount - 1);
...
endInsertRows();
}
}
To copy to clipboard, switch view to plain text mode
Bookmarks