[Qt-interest] periodically adding rows to table model
linux newbie
linux.newbie79 at gmail.com
Wed Sep 29 04:09:34 CEST 2010
Thanks Stephen.
On Tue, Sep 28, 2010 at 8:23 PM, Stephen Kelly <steveire at gmail.com> wrote:
> 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();
>
>> }
>>
>
>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
More information about the Qt-interest-old
mailing list