Hi..
My listview is displaying same item value...
code..
for(int i=0;i<list.size();i++)
{
model->appendRow(item);
}
ui->listView_4->setModel(model);
static int a = list.size();
for(int i=0;i<a;i++)
{
statusUser = list.takeFirst();
t = new Tweet(statusUser->user.name,statusUser->status.text,statusUser->user.profileImageUrl);
model->item(i)->setSizeHint(t->size());
t->resize(ui->listView_4->size().width()+50, t->size().height());
ui->listView_4->setIndexWidget(model->item(i)->index(), t);
}
model = new QStandardItemModel(this);
for(int i=0;i<list.size();i++)
{
QStandardItem *item = new QStandardItem;
model->appendRow(item);
}
ui->listView_4->setModel(model);
static int a = list.size();
for(int i=0;i<a;i++)
{
statusUser = list.takeFirst();
t = new Tweet(statusUser->user.name,statusUser->status.text,statusUser->user.profileImageUrl);
model->item(i)->setSizeHint(t->size());
t->resize(ui->listView_4->size().width()+50, t->size().height());
ui->listView_4->setIndexWidget(model->item(i)->index(), t);
}
To copy to clipboard, switch view to plain text mode
previously i gave for second for loop size is list.size(),instead of k values...Now i corrected that issue ..But listview showing same item value only through out listview....
please tell the way to avoid of displaying same item values..
Thanks
Addu
Bookmarks