void Widget
::DisplayList(QLinkedList<Returnables
::StatusUser*> list,
QString header
) {
Returnables::StatusUser *statusUser =NULL;
for(int i=0;i<=list.size();i++)
{
//QMessageBox::information(0,"",QString::number(i),QString::number(list.size()));
model->appendRow(item);
}
ui->listView_2->setModel(model);
for(int i=0;i<=list.size();i++)
{
statusUser = list.at(i);
//QMessageBox::information(0,"name",QString(list[i]));
t = new Tweet(statusUser->user.name,statusUser->status.text,statusUser->user.profileImageUrl);
model->item(i)->setSizeHint(t->size());
t->resize(ui->listView_2->size().width()+50, t->size().height());
ui->listView_2->setIndexWidget(model->item(i)->index(), t);
}
}
void Widget::DisplayList(QLinkedList<Returnables::StatusUser*> list, QString header)
{
Returnables::StatusUser *statusUser =NULL;
model = new QStandardItemModel(this);
for(int i=0;i<=list.size();i++)
{
//QMessageBox::information(0,"",QString::number(i),QString::number(list.size()));
QStandardItem *item = new QStandardItem;
model->appendRow(item);
}
ui->listView_2->setModel(model);
for(int i=0;i<=list.size();i++)
{
statusUser = list.at(i);
//QMessageBox::information(0,"name",QString(list[i]));
t = new Tweet(statusUser->user.name,statusUser->status.text,statusUser->user.profileImageUrl);
model->item(i)->setSizeHint(t->size());
t->resize(ui->listView_2->size().width()+50, t->size().height());
ui->listView_2->setIndexWidget(model->item(i)->index(), t);
}
}
To copy to clipboard, switch view to plain text mode
Bookmarks