- popup = new QMenu(this);
-
- QScrollArea *scroller = new QScrollArea(this);
- setCentralWidget(scroller);
- scroller->setProperty("FingerScrollable", true);
- // scroller->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
- // scroller->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
- scroller->setFrameStyle(QFrame::NoFrame);
- scroller->show();
-
- QWidget *content = new QWidget(scroller);
- contentLayout = new QVBoxLayout(content);
- contentLayout->setMargin(0);
- content->setLayout(contentLayout);
- content->show();
-
- scroller->setWidget(content);
- scroller->setWidgetResizable(true);
-#else
- QFrame *frame = new QFrame(this);
- setCentralWidget(frame);
- contentLayout = new QHBoxLayout();
- frame->setLayout(contentLayout);
-#ifndef Q_OS_SYMBIAN
- buttonBox = new QDialogButtonBox(Qt::Vertical, this);
- contentLayout->addWidget(buttonBox);
+#endif
+ setAttribute(Qt::WA_DeleteOnClose);
+
+ list = new QListWidget(this);
+ list->setSelectionMode(QAbstractItemView::SingleSelection);
+#if defined(Q_OS_SYMBIAN)
+ list->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
+#endif
+ populateList();
+ setCentralWidget(list);
+
+#ifdef Q_OS_SYMBIAN
+ charm = new FlickCharm(this);
+ // charm->activateOn(list);
+ QAction *closeAction = new QAction(parent? tr("Back"): tr("Exit"), this);
+ closeAction->setSoftKeyRole(QAction::NegativeSoftKey);
+ connect(closeAction, SIGNAL(triggered()), this, SLOT(close()));
+ QMainWindow::addAction(closeAction);