[Qt-interest] periodically adding rows to table model

Stephen Kelly steveire at gmail.com
Tue Sep 28 12:23:47 CEST 2010


linux newbie wrote:

> Hi,
> 
> I my tableModel which is inherited from QAbstractTableModel, I like to
> add new row for every 2secs. I set the QTimer in the constructor and
> it is calling "addRow" slot. What steps do I need to follow in
> "addRow" slot, in order to create new row and displaying that row in
> TableView.

> void ClientModel::addRow()
> {

beginInsertRow(QModelIndex(), selectionList.size(), selectionList.size());
selectionList.append(false);
endiInsertRow();

> }
> 






More information about the Qt-interest-old mailing list