Index: src/UIElements/Qt4/Query/ElementsQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/ElementsQtQuery.cpp	(revision f84992c16bf92e5a1b141f5fccae1516c7ab340c)
+++ src/UIElements/Qt4/Query/ElementsQtQuery.cpp	(revision 5727016afa28309442458be03eb48bd768aea788)
@@ -18,53 +18,53 @@
 #endif
 
+#include <Qt/qpushbutton.h>
 #include <Qt/qboxlayout.h>
-#include <Qt/qcombobox.h>
-#include <Qt/qlabel.h>
+#include <Qt/qlistwidget.h>
 
 #include "CodePatterns/MemDebug.hpp"
 
+
 #include "UIElements/Qt4/Query/QtQuery.hpp"
-#include "UIElements/Qt4/Pipe/ElementsQtQueryPipe.hpp"
-
-#include "Element/element.hpp"
-#include "Element/periodentafel.hpp"
-#include "World.hpp"
+#include "UIElements/Qt4/Query/QtQueryList.hpp"
+#include "UIElements/Qt4/Pipe/QtQueryListPipe.hpp"
 
 
-QtDialog::ElementsQtQuery::ElementsQtQuery(Parameter<std::vector<const element *> > &_param, std::string _title, QBoxLayout *_parent, Dialog *_dialog) :
+QtDialog::ElementsQtQuery::ElementsQtQuery(Parameter<std::vector<const element *> > &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) :
     Dialog::ElementsQuery(_param, _title),
-    parent(_parent),
-    dialog(_dialog)
+    QtQueryList<const element *>(_parent, _dialog, temp)
 {
-  periodentafel *periode = World::getInstance().getPeriode();
-  thisLayout = new QHBoxLayout();
-  titleLabel = new QLabel(QString(getTitle().c_str()));
-  inputBox = new QComboBox();
-  for(periodentafel::const_iterator iter = periode->begin();
-      iter!=periode->end();
-      ++iter)
-  {
-    std::stringstream sstr;
-    sstr << (*iter).first << "\t" << (*iter).second->getName();
-    inputBox->addItem(QString(sstr.str().c_str()),QVariant((*iter).first));
-  }
-  parent->addLayout(thisLayout);
-  thisLayout->addWidget(titleLabel);
-  thisLayout->addWidget(inputBox);
+  ListQuerySubDialog *subDialog = new ListQuerySubDialog(this);
+  subQuery = new ElementQtQuery(*subParam, _title, thisVLayout, subDialog);
+  subDialog->setSubQuery(subQuery);
 
-  /*pipe = new ElementsQtQueryPipe(temp,_dialog,inputBox);
-  pipe->update(inputBox->currentIndex());
-  connect(inputBox,SIGNAL(currentIndexChanged(int)),pipe,SLOT(update(int)));*/
+  connect(inputList,SIGNAL(itemSelectionChanged()),this,SLOT(onElementSelected()));
+  connect(addButton,SIGNAL(clicked()),this,SLOT(onAddElement()));
+  connect(removeButton,SIGNAL(clicked()),this,SLOT(onRemoveElement()));
 }
 
 QtDialog::ElementsQtQuery::~ElementsQtQuery()
 {
+  delete(subQuery);
 }
 
-void QtDialog::ElementsQtQuery::onUpdate() {
-  dialog->update();
+void QtDialog::ElementsQtQuery::onSubUpdate()
+{
+  addButton->setEnabled(subParam->isSet());
 }
 
-bool QtDialog::ElementsQtQuery::handle(){
+void QtDialog::ElementsQtQuery::onElementSelected() {
+  elementSelected();
+}
+
+void QtDialog::ElementsQtQuery::onAddElement() {
+  addElement();
+}
+
+void QtDialog::ElementsQtQuery::onRemoveElement() {
+  removeElements();
+}
+
+bool QtDialog::ElementsQtQuery::handle()
+{
   if (param.isValid(temp)){
     param.set(temp);
@@ -74,2 +74,3 @@
 }
 
+
Index: src/UIElements/Qt4/Query/QtQuery.hpp
===================================================================
--- src/UIElements/Qt4/Query/QtQuery.hpp	(revision f84992c16bf92e5a1b141f5fccae1516c7ab340c)
+++ src/UIElements/Qt4/Query/QtQuery.hpp	(revision 5727016afa28309442458be03eb48bd768aea788)
@@ -162,20 +162,20 @@
 };
 
-class QtDialog::ElementsQtQuery : public QWidget, public Dialog::ElementsQuery {
-  Q_OBJECT
-public:
-  ElementsQtQuery(Parameter<std::vector<const element *> > &, std::string _title, QBoxLayout *_parent, Dialog *_dialog);
+class QtDialog::ElementsQtQuery : public QWidget, public Dialog::ElementsQuery, public QtQueryList<const element *> {
+  Q_OBJECT
+public:
+  ElementsQtQuery(Parameter<std::vector<const element *> > &, std::string _title, QBoxLayout *_parent,Dialog *_dialog);
   virtual ~ElementsQtQuery();
   virtual bool handle();
 
-public slots:
-  void onUpdate();
-
-private:
-  QBoxLayout *parent;
-  QBoxLayout *thisLayout;
-  QLabel *titleLabel;
-  QComboBox *inputBox;
-  Dialog *dialog;
+  virtual void onSubUpdate();
+
+public slots:
+  void onAddElement();
+  void onRemoveElement();
+  void onElementSelected();
+
+private:
+  ElementQtQuery *subQuery;
 };
 
