- addList(list);
- connect(list, SIGNAL(itemActivated(QListWidgetItem*)),
- this, SLOT(onItemActivated(QListWidgetItem*)));
-
-#ifndef Q_WS_MAEMO_5
- addAction(tr("Close"), this, SLOT(close()), QDialogButtonBox::RejectRole);
-#endif // Q_WS_MAEMO_5
+ QStringListModel *model = new QStringListModel(data, this);
+ setModel(model);
+ connect(this, SIGNAL(activated(const QModelIndex &)),
+ this, SLOT(onItemActivated(const QModelIndex &)));