- QHBoxLayout *horizontalLayout = new QHBoxLayout(this);
- horizontalLayout->addWidget(list);
-
- QDialogButtonBox *buttonBox = new QDialogButtonBox(Qt::Vertical);
-#ifndef Q_WS_MAEMO_5
- QPushButton *goButton = new QPushButton(tr("Go"), this);
- buttonBox->addButton(goButton, QDialogButtonBox::AcceptRole);
- connect(goButton, SIGNAL(clicked()), this, SLOT(onGo()));
-#endif
- QPushButton *addButton = new QPushButton(tr("Add"), this);
- buttonBox->addButton(addButton, QDialogButtonBox::ActionRole);
- connect(addButton, SIGNAL(clicked()), this, SLOT(onAdd()));
-
- horizontalLayout->addWidget(buttonBox);
-
-#ifdef Q_WS_MAEMO_5
- connect(list, SIGNAL(itemActivated(QListWidgetItem *)),
- this, SLOT(onItemActivated(QListWidgetItem *)));
-#endif
+ connect(this, SIGNAL(activated(const QModelIndex &)),
+ this, SLOT(onItemActivated(const QModelIndex &)));