Qt::CustomizeWindowHint | Qt::WindowCloseButtonHint),
showButtons(showButtons_)
{
+ setAttribute(Qt::WA_DeleteOnClose);
+
scroller = new QScrollArea(this);
#if defined(Q_WS_MAEMO_5)
#endif
scroller->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
scroller->setFrameStyle(QFrame::NoFrame);
+#if defined(Q_OS_SYMBIAN)
+ setStyleSheet("QFrame {margin:0; border:0; padding:0}");
+ setStyleSheet("QScrollArea {margin:0; border:0; padding:0}");
+#endif
content = new QWidget(scroller);
contentLayout = new QVBoxLayout(content);
}
#ifdef Q_OS_SYMBIAN
Q_UNUSED(role);
-#if 0
if (!leftSoftKey) {
- qDebug() << "Adding left soft key";
+ // Add new action as left softkey
leftSoftKey = new QAction(label, this);
leftSoftKey->setSoftKeyRole(QAction::PositiveSoftKey);
connect(leftSoftKey, SIGNAL(triggered()), receiver, slot);
addAction(leftSoftKey);
} else {
-#endif
if (!menuBar) {
- qDebug() << "Creating menu bar";
+ // Create menu bar
menuBar = new QMenuBar(this);
+ // Add previous LSK to menu bar
+ leftSoftKey->setSoftKeyRole(QAction::NoSoftKey);
menuBar->addAction(leftSoftKey);
}
- qDebug() << "Adding to menu bar";
+ // Add new action to menu bar
QAction *action = new QAction(label, this);
connect(action, SIGNAL(triggered()), receiver, slot);
menuBar->addAction(action);
-#if 0
}
-#endif
#else
QPushButton *button = new QPushButton(label, this);
connect(button, SIGNAL(clicked()), receiver, slot);