Index: src/UIElements/QT4/QTMainWindow.cpp
===================================================================
--- src/UIElements/QT4/QTMainWindow.cpp	(revision b800215c062e714dbeab7570ef2a6df003c54c1c)
+++ src/UIElements/QT4/QTMainWindow.cpp	(revision b2531f58b99abea1c74e576621a963d2f22b369f)
@@ -15,9 +15,16 @@
 
 #include<iostream>
+#include<map>
+
 #include<boost/bind.hpp>
 
 #include "atom.hpp"
 #include "molecule.hpp"
+#include "Actions/Action.hpp"
+#include "Actions/ActionRegistry.hpp"
+#include "Actions/MapOfActions.hpp"
+#include "Menu/Menu.hpp"
 #include "Menu/QT4/QTMenu.hpp"
+#include "Menu/ActionMenuItem.hpp"
 #include "Views/QT4/QTWorldView.hpp"
 #include "Views/QT4/GLMoleculeView.hpp"
@@ -40,5 +47,25 @@
   molecule3dDisplay = new GLMoleculeView();
 
-  QMenuBar *Menu = menuBar();
+  MenuBar = menuBar();
+
+  std::map <std::string, QTMenu *> NametoTextMenuMap;
+  // go through all menus and create them
+  QTMenu *Menu = NULL;
+  for(std::map<std::string, std::pair<std::string,std::string> >::iterator iter = MapOfActions::getInstance().MenuDescription.begin(); iter != MapOfActions::getInstance().MenuDescription.end(); ++iter) {
+    cout << "Creating menu " << iter->first << endl;
+    Menu = new QTMenu(iter->first.c_str());
+    MenuBar->addMenu(Menu);
+    NametoTextMenuMap.insert( pair <std::string, QTMenu *> (iter->first, Menu) );
+    //new SubMenuItem(getSuitableShortForm(iter->first),iter->second.first,main_menu,Menu);
+  }
+
+  // populate all actions
+  MapOfActions::getInstance().populateActions();
+
+  // go through all actions and add them to its menu
+  for (std::map <std::string, QTMenu *>::iterator MenuRunner = NametoTextMenuMap.begin(); MenuRunner != NametoTextMenuMap.end(); ++MenuRunner) {
+    cout << "Creating Action " << MenuRunner->first << " in menu " << MenuRunner->second << endl;
+    populateMenu(MenuRunner->second, MenuRunner->first);
+  }
 
   setCentralWidget(splitter1);
@@ -65,2 +92,29 @@
   theApp->exec();
 }
+
+char QTMainWindow::getSuitableShortForm(set <char> &ShortcutList, const std::string name) const
+{
+  for (std::string::const_iterator CharRunner = name.begin(); CharRunner != name.end(); ++CharRunner) {
+    if (ShortcutList.find(*CharRunner) == ShortcutList.end())
+      return *CharRunner;
+  }
+  DoeLog(1) && (eLog() << Verbose(1) << "Could not find a suitable shortform for TextWindow::getSuitableShortForm()." << endl);
+  return ((char)(ShortcutList.size() % 10) + '0');
+}
+
+void QTMainWindow::populateMenu(QTMenu* Menu, const  std::string &MenuName)
+{
+  Action *ActionItem = NULL;
+  set <char> ShortcutList;
+  // through all actions for this menu
+  std::pair < std::multimap <std::string, std::string>::iterator, std::multimap <std::string, std::string>::iterator > MenuActions = MapOfActions::getInstance().MenuContainsActionMap.equal_range(MenuName);
+  for (std::multimap <std::string, std::string>::const_iterator MenuRunner = MenuActions.first; MenuRunner != MenuActions.second; ++MenuRunner) {
+    cout << " Adding " << MenuRunner->second << " to submenu " << MenuName << endl;
+    ActionItem = ActionRegistry::getInstance().getActionByName(MenuRunner->second);
+    new ActionMenuItem(getSuitableShortForm(ShortcutList, MenuRunner->second),MapOfActions::getInstance().getDescription(MenuRunner->second).c_str(),Menu,ActionItem);
+  }
+  // finally add default quit item
+  //Action *returnFromAction = new TextMenu::LeaveAction(Menu);
+  //MenuItem *returnFromItem = new ActionMenuItem('q',"return to Main menu",Menu,returnFromAction);
+  //Menu->addDefault(returnFromItem);
+}
Index: src/UIElements/QT4/QTMainWindow.hpp
===================================================================
--- src/UIElements/QT4/QTMainWindow.hpp	(revision b800215c062e714dbeab7570ef2a6df003c54c1c)
+++ src/UIElements/QT4/QTMainWindow.hpp	(revision b2531f58b99abea1c74e576621a963d2f22b369f)
@@ -11,4 +11,6 @@
 #include "UIElements/MainWindow.hpp"
 #include <QtGui/QMainWindow>
+
+#include <set>
 
 class QTWorldView;
@@ -29,4 +31,7 @@
   virtual void display();
 
+  char getSuitableShortForm(std::set <char> &ShortcutList, const std::string name) const;
+  void populateMenu(QTMenu* Menu, const  std::string &MenuName);
+
 private:
   // All kinds of QTStuff used in this window
@@ -37,4 +42,5 @@
   QTMoleculeView *moleculeDisplay;
   QTStatusBar *statusBar;
+  QMenuBar *MenuBar;
 
 };
