summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2015-11-20 08:58:17 +0100
committerMontel Laurent <[email protected]>2015-11-20 08:58:17 +0100
commitdfaf2f5c4e138cab91e4de86685a7fce92382681 (patch)
tree5e3626383598794bdca488f08581da8b2e818aeb
parentf0bcc5363c9aeade177a579722e567a6adf9081a (diff)
Add help menu
-rw-r--r--accountwizard/dialog.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/accountwizard/dialog.cpp b/accountwizard/dialog.cpp
index 9978bfc..8c1244f 100644
--- a/accountwizard/dialog.cpp
+++ b/accountwizard/dialog.cpp
@@ -38,6 +38,9 @@
#include "accountwizard_debug.h"
#include <kmessagebox.h>
#include <qplatformdefs.h>
+#include <KAboutData>
+
+#include <KHelpMenu>
Dialog::Dialog(QWidget *parent, Qt::WindowFlags flags) :
KAssistantDialog(parent, flags)
@@ -92,6 +95,12 @@ Dialog::Dialog(QWidget *parent, Qt::WindowFlags flags) :
page->enterPageNext();
Q_EMIT page->pageEnteredNext();
connect(button(QDialogButtonBox::Cancel), &QPushButton::clicked, this, &Dialog::accept);
+ KHelpMenu *helpMenu = new KHelpMenu(this, KAboutData::applicationData(), true);
+ //Initialize menu
+ QMenu *menu = helpMenu->menu();
+ helpMenu->action(KHelpMenu::menuAboutApp)->setIcon(QIcon::fromTheme(QStringLiteral("akonadi")));
+ button(QDialogButtonBox::Help)->setMenu(menu);
+
}
KPageWidgetItem *Dialog::addPage(Page *page, const QString &title)