Hey,
I have a onText method that connects to a QAbstractItemModel's rowsInserted SIGNAL so I can be notified when new rows have been inserted:
QObject::connect(model, SIGNAL(rowsInserted ( const QModelIndex & , int , int ) ),
client_,SLOT(onText( const QModelIndex & , int , int )) )
The signal works fine, since I am notified when rows are inserted. Here is the onText method:
void FTClientWidget::onText( const QModelIndex & parent, int start, int end )
{
Proxy::write("notified!");
if(!parent.isValid())
Proxy::write("NOT VALID!");
else
Proxy::write("VALID");
QAbstractItemModel* m = parent.model();
}
But I can't seem to be able to get the string from the inserted items. The QModelIndex "parent" passed is NOT VALID, and "m" QAbstractItemModel is NULL. I think its because it's not a actual item, but just a pointer to one? How do I get a hold of the inserted text/elements?