#include #include #include #include #include "mylist.h" int main(int argc, char *argv[]) { QApplication a(argc, argv); MyList *v = new MyList(); v->setContextMenuPolicy(Qt::NoContextMenu); v->setIconSize(QSize(100, 100)); QStandardItemModel *m = new QStandardItemModel(); v->setModel(m); m->appendRow(new QStandardItem("Item 1")); m->appendRow(new QStandardItem("Item 2")); v->show(); v->m = m; QTimer::singleShot(1000, v, SLOT(setIcons())); return a.exec(); }