Index: src/UIElements/Qt4/Query/AtomQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/AtomQtQuery.cpp	(revision b3a54d297c531a6a0c32ca19afe7061e11492b31)
+++ src/UIElements/Qt4/Query/AtomQtQuery.cpp	(revision 7c99210d342dfb64d6b9787241278d8bfdd2ba58)
@@ -32,5 +32,6 @@
 QtDialog::AtomQtQuery::AtomQtQuery(Parameter<const atom *> &_param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
     Dialog::AtomQuery(_param, _title),
-    parent(_parent)
+    parent(_parent),
+    dialog(_dialog)
 {
   thisLayout = new QHBoxLayout();
@@ -48,5 +49,5 @@
   pipe = new AtomQtQueryPipe(temp,_dialog, inputBox);
   pipe->update(inputBox->currentIndex());
-  connect(inputBox,SIGNAL(currentIndexChanged(int)),pipe,SLOT(update(int)));
+  connect(inputBox,SIGNAL(currentIndexChanged(int)),this,SLOT(onUpdate(int)));
 }
 
@@ -54,4 +55,11 @@
 {
   delete pipe;
+}
+
+void QtDialog::AtomQtQuery::onUpdate(int newIndex) {
+  QVariant data = inputBox->itemData(newIndex);
+  int idx = data.toInt();
+  temp = World::getInstance().getAtom(AtomById(idx));
+  dialog->update();
 }
 
Index: src/UIElements/Qt4/Query/AtomsQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/AtomsQtQuery.cpp	(revision b3a54d297c531a6a0c32ca19afe7061e11492b31)
+++ src/UIElements/Qt4/Query/AtomsQtQuery.cpp	(revision 7c99210d342dfb64d6b9787241278d8bfdd2ba58)
@@ -35,5 +35,6 @@
 QtDialog::AtomsQtQuery::AtomsQtQuery(Parameter<std::vector<const atom *> > &_param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
     Dialog::AtomsQuery(_param, _title),
-    parent(_parent)
+    parent(_parent),
+    dialog(_dialog)
 {
   QHBoxLayout * thisHLayout = new QHBoxLayout();
@@ -78,4 +79,8 @@
 }
 
+void QtDialog::AtomsQtQuery::onUpdate() {
+  dialog->update();
+}
+
 bool QtDialog::AtomsQtQuery::handle() {
   if (param.isValid(temp)){
Index: src/UIElements/Qt4/Query/BooleanQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/BooleanQtQuery.cpp	(revision b3a54d297c531a6a0c32ca19afe7061e11492b31)
+++ src/UIElements/Qt4/Query/BooleanQtQuery.cpp	(revision 7c99210d342dfb64d6b9787241278d8bfdd2ba58)
@@ -30,5 +30,6 @@
 QtDialog::BooleanQtQuery::BooleanQtQuery(Parameter<bool> &_param, std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :
     Dialog::BooleanQuery(_param, _title),
-    parent(_parent)
+    parent(_parent),
+    dialog(_dialog)
 {
   temp = false;
@@ -45,5 +46,5 @@
 
   pipe = new BooleanQtQueryPipe(temp,_dialog,booleanCheckBox);
-  connect(booleanCheckBox, SIGNAL(stateChanged(int)), pipe, SLOT(update(int)));
+  connect(booleanCheckBox, SIGNAL(stateChanged(int)), this, SLOT(onUpdate(int)));
 }
 
@@ -51,4 +52,9 @@
 {
   delete pipe;
+}
+
+void QtDialog::BooleanQtQuery::onUpdate(int state) {
+  temp = (state == Qt::Checked);
+  dialog->update();
 }
 
Index: src/UIElements/Qt4/Query/DoubleQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/DoubleQtQuery.cpp	(revision b3a54d297c531a6a0c32ca19afe7061e11492b31)
+++ src/UIElements/Qt4/Query/DoubleQtQuery.cpp	(revision 7c99210d342dfb64d6b9787241278d8bfdd2ba58)
@@ -30,5 +30,6 @@
 QtDialog::DoubleQtQuery::DoubleQtQuery(Parameter<double> &_param, std::string title,QBoxLayout *_parent,QtDialog *_dialog) :
     Dialog::DoubleQuery(_param, title),
-    parent(_parent)
+    parent(_parent),
+    dialog(_dialog)
 {
   temp = 0.0;
@@ -45,12 +46,17 @@
   thisLayout->addWidget(inputBox);
 
-  pipe = new DoubleQtQueryPipe(temp,_dialog);
-  pipe->update(inputBox->value());
-  connect(inputBox,SIGNAL(valueChanged(double)),pipe,SLOT(update(double)));
+  //pipe = new DoubleQtQueryPipe(temp,_dialog);
+  //pipe->update(inputBox->value());
+  connect(inputBox,SIGNAL(valueChanged(double)),this,SLOT(onUpdate(double)));
 }
 
 QtDialog::DoubleQtQuery::~DoubleQtQuery()
 {
-  delete pipe;
+  //delete pipe;
+}
+
+void QtDialog::DoubleQtQuery::onUpdate(double newDbl) {
+  temp = newDbl;
+  dialog->update();
 }
 
Index: src/UIElements/Qt4/Query/DoublesQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/DoublesQtQuery.cpp	(revision b3a54d297c531a6a0c32ca19afe7061e11492b31)
+++ src/UIElements/Qt4/Query/DoublesQtQuery.cpp	(revision 7c99210d342dfb64d6b9787241278d8bfdd2ba58)
@@ -32,5 +32,6 @@
 QtDialog::DoublesQtQuery::DoublesQtQuery(Parameter<std::vector<double> > &_param, std::string title,QBoxLayout *_parent,QtDialog *_dialog) :
     Dialog::DoublesQuery(_param, title),
-    parent(_parent)
+    parent(_parent),
+    dialog(_dialog)
 {
   QHBoxLayout * thisHLayout = new QHBoxLayout();
@@ -71,4 +72,8 @@
 }
 
+void QtDialog::DoublesQtQuery::onUpdate() {
+  dialog->update();
+}
+
 bool QtDialog::DoublesQtQuery::handle() {
   if (param.isValid(temp)){
Index: src/UIElements/Qt4/Query/ElementQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/ElementQtQuery.cpp	(revision b3a54d297c531a6a0c32ca19afe7061e11492b31)
+++ src/UIElements/Qt4/Query/ElementQtQuery.cpp	(revision 7c99210d342dfb64d6b9787241278d8bfdd2ba58)
@@ -33,5 +33,6 @@
 QtDialog::ElementQtQuery::ElementQtQuery(Parameter<const element *> &_param, std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :
     Dialog::ElementQuery(_param, _title),
-    parent(_parent)
+    parent(_parent),
+    dialog(_dialog)
 {
   periodentafel *periode = World::getInstance().getPeriode();
@@ -53,5 +54,5 @@
   pipe = new ElementQtQueryPipe(temp,_dialog,inputBox);
   pipe->update(inputBox->currentIndex());
-  connect(inputBox,SIGNAL(currentIndexChanged(int)),pipe,SLOT(update(int)));
+  connect(inputBox,SIGNAL(currentIndexChanged(int)),this,SLOT(onUpdate(int)));
 }
 
@@ -59,4 +60,11 @@
 {
   delete pipe;
+}
+
+void QtDialog::ElementQtQuery::onUpdate(int newIndex) {
+  QVariant data = inputBox->itemData(newIndex);
+  int idx = data.toInt();
+  temp = World::getInstance().getPeriode()->FindElement(idx);
+  dialog->update();
 }
 
Index: src/UIElements/Qt4/Query/ElementsQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/ElementsQtQuery.cpp	(revision b3a54d297c531a6a0c32ca19afe7061e11492b31)
+++ src/UIElements/Qt4/Query/ElementsQtQuery.cpp	(revision 7c99210d342dfb64d6b9787241278d8bfdd2ba58)
@@ -34,5 +34,6 @@
 QtDialog::ElementsQtQuery::ElementsQtQuery(Parameter<std::vector<const element *> > &_param, std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :
     Dialog::ElementsQuery(_param, _title),
-    parent(_parent)
+    parent(_parent),
+    dialog(_dialog)
 {
   periodentafel *periode = World::getInstance().getPeriode();
@@ -62,4 +63,8 @@
 }
 
+void QtDialog::ElementsQtQuery::onUpdate() {
+  dialog->update();
+}
+
 bool QtDialog::ElementsQtQuery::handle(){
   if (param.isValid(temp)){
Index: src/UIElements/Qt4/Query/EmptyQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/EmptyQtQuery.cpp	(revision b3a54d297c531a6a0c32ca19afe7061e11492b31)
+++ src/UIElements/Qt4/Query/EmptyQtQuery.cpp	(revision 7c99210d342dfb64d6b9787241278d8bfdd2ba58)
@@ -29,5 +29,6 @@
 QtDialog::EmptyQtQuery::EmptyQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :
     Dialog::EmptyQuery(_title),
-    parent(_parent)
+    parent(_parent),
+    dialog(_dialog)
 {
   thisLayout = new QHBoxLayout();
Index: src/UIElements/Qt4/Query/FileQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/FileQtQuery.cpp	(revision b3a54d297c531a6a0c32ca19afe7061e11492b31)
+++ src/UIElements/Qt4/Query/FileQtQuery.cpp	(revision 7c99210d342dfb64d6b9787241278d8bfdd2ba58)
@@ -22,4 +22,5 @@
 #include <Qt/qlineedit.h>
 #include <Qt/qpushbutton.h>
+#include <QtGui/QFileDialog>
 
 #include "CodePatterns/MemDebug.hpp"
@@ -31,5 +32,6 @@
 QtDialog::FileQtQuery::FileQtQuery(Parameter<boost::filesystem::path> &_param, std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :
     Dialog::FileQuery(_param, _title),
-    parent(_parent)
+    parent(_parent),
+    dialog(_dialog)
 {
 
@@ -42,4 +44,5 @@
 
   filedialogButton = new QPushButton("&Choose", _dialog);
+  theFileDialog = NULL;
 
   pipe = new FileQtQueryPipe(temp,_dialog,filenameLineEdit,filedialogButton);
@@ -51,5 +54,5 @@
   thisLayout->addWidget(filedialogButton);
 
-  QObject::connect(filedialogButton,SIGNAL(clicked()),pipe,SLOT(showFileDialog()));
+  QObject::connect(filedialogButton,SIGNAL(clicked()),this,SLOT(showFileDialog()));
 }
 
@@ -57,4 +60,28 @@
 {
   delete pipe;
+  if (theFileDialog != NULL)
+    delete theFileDialog;
+}
+
+void QtDialog::FileQtQuery::onUpdate() {
+  QStringList ListOfFilenames = theFileDialog->selectedFiles();
+  std::cout << "Selected File is " << ListOfFilenames.at(0).toStdString() << std::endl;
+  temp = ListOfFilenames.at(0).toStdString();
+  filenameLineEdit->setText(QString::fromStdString(temp.string()));
+  dialog->update();
+}
+
+void QtDialog::FileQtQuery::showFileDialog() {
+  filedialogButton->setFlat(true);
+  if (theFileDialog == NULL) {
+    theFileDialog = new QFileDialog(NULL, tr("Open input file"), QString(), tr("ParallelCarParrinello (*.conf);;MassivelyParallelQuantumChemistry (*.mpqc);;ParticleDataBase (*.pdb);;XYZ (*.xyz)"));
+    theFileDialog->setAcceptMode(QFileDialog::AcceptOpen);
+    theFileDialog->setFileMode(QFileDialog::AnyFile);
+    theFileDialog->setViewMode(QFileDialog::List);
+  }
+  theFileDialog->exec();
+
+  onUpdate();
+  filedialogButton->setFlat(false);
 }
 
Index: src/UIElements/Qt4/Query/FilesQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/FilesQtQuery.cpp	(revision b3a54d297c531a6a0c32ca19afe7061e11492b31)
+++ src/UIElements/Qt4/Query/FilesQtQuery.cpp	(revision 7c99210d342dfb64d6b9787241278d8bfdd2ba58)
@@ -34,5 +34,6 @@
 QtDialog::FilesQtQuery::FilesQtQuery(Parameter<std::vector< boost::filesystem::path> > &param, std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :
     Dialog::FilesQuery(param, _title),
-    parent(_parent)
+    parent(_parent),
+    dialog(_dialog)
 {
   QHBoxLayout * thisHLayout = new QHBoxLayout();
@@ -74,4 +75,8 @@
 }
 
+void QtDialog::FilesQtQuery::onUpdate() {
+  dialog->update();
+}
+
 bool QtDialog::FilesQtQuery::handle(){
   if (param.isValid(temp)){
Index: src/UIElements/Qt4/Query/IntQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/IntQtQuery.cpp	(revision b3a54d297c531a6a0c32ca19afe7061e11492b31)
+++ src/UIElements/Qt4/Query/IntQtQuery.cpp	(revision 7c99210d342dfb64d6b9787241278d8bfdd2ba58)
@@ -30,5 +30,6 @@
 QtDialog::IntQtQuery::IntQtQuery(Parameter<int> &_param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
     Dialog::IntQuery(_param, _title),
-    parent(_parent)
+    parent(_parent),
+    dialog(_dialog)
 {
   temp = 0;
@@ -45,5 +46,5 @@
   pipe = new IntQtQueryPipe(temp,_dialog);
   pipe->update(inputBox->value());
-  connect(inputBox,SIGNAL(valueChanged(int)),pipe,SLOT(update(int)));
+  connect(inputBox,SIGNAL(valueChanged(int)),this,SLOT(onUpdate(int)));
 }
 
@@ -51,4 +52,9 @@
 {
   delete pipe;
+}
+
+void QtDialog::IntQtQuery::onUpdate(int newInt) {
+  temp = newInt;
+  dialog->update();
 }
 
Index: src/UIElements/Qt4/Query/IntsQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/IntsQtQuery.cpp	(revision b3a54d297c531a6a0c32ca19afe7061e11492b31)
+++ src/UIElements/Qt4/Query/IntsQtQuery.cpp	(revision 7c99210d342dfb64d6b9787241278d8bfdd2ba58)
@@ -32,5 +32,6 @@
 QtDialog::IntsQtQuery::IntsQtQuery(Parameter<std::vector<int> > &_param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
     Dialog::IntsQuery(_param, _title),
-    parent(_parent)
+    parent(_parent),
+    dialog(_dialog)
 {
   QHBoxLayout * thisHLayout = new QHBoxLayout();
@@ -72,4 +73,8 @@
 }
 
+void QtDialog::IntsQtQuery::onUpdate() {
+  dialog->update();
+}
+
 bool QtDialog::IntsQtQuery::handle() {
   if (param.isValid(temp)){
Index: src/UIElements/Qt4/Query/MoleculeQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/MoleculeQtQuery.cpp	(revision b3a54d297c531a6a0c32ca19afe7061e11492b31)
+++ src/UIElements/Qt4/Query/MoleculeQtQuery.cpp	(revision 7c99210d342dfb64d6b9787241278d8bfdd2ba58)
@@ -33,5 +33,6 @@
 QtDialog::MoleculeQtQuery::MoleculeQtQuery(Parameter<const molecule *> &_param, std::string _title, QBoxLayout *_parent,QtDialog *_dialog) :
     Dialog::MoleculeQuery(_param, _title),
-    parent(_parent)
+    parent(_parent),
+    dialog(_dialog)
 {
   thisLayout = new QHBoxLayout();
@@ -53,5 +54,5 @@
   pipe = new MoleculeQtQueryPipe(temp,_dialog,inputBox);
   pipe->update(inputBox->currentIndex());
-  connect(inputBox,SIGNAL(currentIndexChanged(int)),pipe,SLOT(update(int)));
+  connect(inputBox,SIGNAL(currentIndexChanged(int)),this,SLOT(onUpdate(int)));
 }
 
@@ -59,4 +60,11 @@
 {
   delete pipe;
+}
+
+void QtDialog::MoleculeQtQuery::onUpdate(int newIndex) {
+  QVariant data = inputBox->itemData(newIndex);
+  int idx = data.toInt();
+  temp = World::getInstance().getMolecule(MoleculeById(idx));
+  dialog->update();
 }
 
Index: src/UIElements/Qt4/Query/MoleculesQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/MoleculesQtQuery.cpp	(revision b3a54d297c531a6a0c32ca19afe7061e11492b31)
+++ src/UIElements/Qt4/Query/MoleculesQtQuery.cpp	(revision 7c99210d342dfb64d6b9787241278d8bfdd2ba58)
@@ -33,5 +33,6 @@
 QtDialog::MoleculesQtQuery::MoleculesQtQuery(Parameter<std::vector<const molecule *> > &_param, std::string _title, QBoxLayout *_parent,QtDialog *_dialog) :
     Dialog::MoleculesQuery(_param, _title),
-    parent(_parent)
+    parent(_parent),
+    dialog(_dialog)
 {
   thisLayout = new QHBoxLayout();
@@ -61,4 +62,8 @@
 }
 
+void QtDialog::MoleculesQtQuery::onUpdate() {
+  dialog->update();
+}
+
 // Handling is easy, since the GUI makes it impossible to select invalid values
 bool QtDialog::MoleculesQtQuery::handle()
Index: src/UIElements/Qt4/Query/QtQuery.hpp
===================================================================
--- src/UIElements/Qt4/Query/QtQuery.hpp	(revision b3a54d297c531a6a0c32ca19afe7061e11492b31)
+++ src/UIElements/Qt4/Query/QtQuery.hpp	(revision 7c99210d342dfb64d6b9787241278d8bfdd2ba58)
@@ -15,4 +15,5 @@
 
 
+#include <Qt/qwidget.h>
 #include "Qt4/QtDialog.hpp"
 #include "Parameters/Parameter.hpp"
@@ -31,4 +32,5 @@
 class QComboBox;
 class QCheckBox;
+class QFileDialog;
 
 // Forward declarations for plumbing
@@ -56,9 +58,14 @@
 class RandomNumberDistribution_ParametersQtQueryPipe;
 
-class QtDialog::AtomQtQuery : public Dialog::AtomQuery {
+class QtDialog::AtomQtQuery : public QWidget, public Dialog::AtomQuery {
+  Q_OBJECT
 public:
   AtomQtQuery(Parameter<const atom *> &, std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
   virtual ~AtomQtQuery();
   virtual bool handle();
+
+public slots:
+  void onUpdate(int);
+
 private:
   QBoxLayout *parent;
@@ -66,13 +73,19 @@
   QLabel *titleLabel;
   QComboBox *inputBox;
+  QtDialog *dialog;
 
   AtomQtQueryPipe *pipe;
 };
 
-class QtDialog::AtomsQtQuery : public Dialog::AtomsQuery {
+class QtDialog::AtomsQtQuery : public QWidget, public Dialog::AtomsQuery {
+  Q_OBJECT
 public:
   AtomsQtQuery(Parameter<std::vector<const atom *> > &, std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
   virtual ~AtomsQtQuery();
   virtual bool handle();
+
+public slots:
+  void onUpdate();
+
 private:
   QBoxLayout *parent;
@@ -81,13 +94,19 @@
   QLabel *inputLabel;
   QListWidget *inputList;
+  QtDialog *dialog;
 
   AtomsQtQueryPipe *pipe;
 };
 
-class QtDialog::BooleanQtQuery : public Dialog::BooleanQuery {
+class QtDialog::BooleanQtQuery : public QWidget, public Dialog::BooleanQuery {
+  Q_OBJECT
 public:
   BooleanQtQuery(Parameter<bool> &, std::string _title, QBoxLayout *_parent, QtDialog *_dialog);
   virtual ~BooleanQtQuery();
   virtual bool handle();
+
+public slots:
+  void onUpdate(int);
+
 private:
   QBoxLayout *parent;
@@ -95,13 +114,19 @@
   QLabel *titleLabel;
   QCheckBox *booleanCheckBox;
+  QtDialog *dialog;
 
   BooleanQtQueryPipe *pipe;
 };
 
-class QtDialog::RealSpaceMatrixQtQuery : public Dialog::RealSpaceMatrixQuery {
+class QtDialog::RealSpaceMatrixQtQuery : public QWidget, public Dialog::RealSpaceMatrixQuery {
+  Q_OBJECT
 public:
   RealSpaceMatrixQtQuery(Parameter<RealSpaceMatrix> &, std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
   virtual ~RealSpaceMatrixQtQuery();
   virtual bool handle();
+
+public slots:
+  void onUpdate(int, int);
+
 private:
   QBoxLayout *parent;
@@ -109,13 +134,19 @@
   QLabel *titleLabel;
   QTableWidget *inputTable;
+  QtDialog *dialog;
 
   RealSpaceMatrixQtQueryPipe *pipe;
 };
 
-class QtDialog::DoubleQtQuery : public Dialog::DoubleQuery {
+class QtDialog::DoubleQtQuery : public QWidget, public Dialog::DoubleQuery {
+  Q_OBJECT
 public:
   DoubleQtQuery(Parameter<double> &, std::string title,QBoxLayout *_parent,QtDialog *_dialog);
   virtual ~DoubleQtQuery();
   virtual bool handle();
+
+public slots:
+  void onUpdate(double);
+
 private:
   QBoxLayout *parent;
@@ -123,13 +154,19 @@
   QLabel *titleLabel;
   QDoubleSpinBox *inputBox;
+  QtDialog *dialog;
 
   DoubleQtQueryPipe *pipe;
 };
 
-class QtDialog::DoublesQtQuery : public Dialog::DoublesQuery {
+class QtDialog::DoublesQtQuery : public QWidget, public Dialog::DoublesQuery {
+  Q_OBJECT
 public:
   DoublesQtQuery(Parameter<std::vector<double> > &, std::string title,QBoxLayout *_parent,QtDialog *_dialog);
   virtual ~DoublesQtQuery();
   virtual bool handle();
+
+public slots:
+  void onUpdate();
+
 private:
   QBoxLayout *parent;
@@ -137,13 +174,19 @@
   QLabel *titleLabel;
   QDoubleSpinBox *inputBox;
+  QtDialog *dialog;
 
   QtQueryListPipe<double> *pipe;
 };
 
-class QtDialog::ElementQtQuery : public Dialog::ElementQuery {
+class QtDialog::ElementQtQuery : public QWidget, public Dialog::ElementQuery {
+  Q_OBJECT
 public:
   ElementQtQuery(Parameter<const element *> &, std::string _title, QBoxLayout *_parent, QtDialog *_dialog);
   virtual ~ElementQtQuery();
   virtual bool handle();
+
+public slots:
+  void onUpdate(int);
+
 private:
   QBoxLayout *parent;
@@ -151,13 +194,19 @@
   QLabel *titleLabel;
   QComboBox *inputBox;
+  QtDialog *dialog;
 
   ElementQtQueryPipe *pipe;
 };
 
-class QtDialog::ElementsQtQuery : public Dialog::ElementsQuery {
+class QtDialog::ElementsQtQuery : public QWidget, public Dialog::ElementsQuery {
+  Q_OBJECT
 public:
   ElementsQtQuery(Parameter<std::vector<const element *> > &, std::string _title, QBoxLayout *_parent, QtDialog *_dialog);
   virtual ~ElementsQtQuery();
   virtual bool handle();
+
+public slots:
+  void onUpdate();
+
 private:
   QBoxLayout *parent;
@@ -165,4 +214,5 @@
   QLabel *titleLabel;
   QComboBox *inputBox;
+  QtDialog *dialog;
 
   ElementsQtQueryPipe *pipe;
@@ -178,13 +228,20 @@
   QBoxLayout *thisLayout;
   QLabel *titleLabel;
+  QtDialog *dialog;
 
   EmptyQtQueryPipe *pipe;
 };
 
-class QtDialog::FileQtQuery : public Dialog::FileQuery {
+class QtDialog::FileQtQuery : public QWidget, public Dialog::FileQuery {
+  Q_OBJECT
 public:
   FileQtQuery(Parameter<boost::filesystem::path> &, std::string _title, QBoxLayout *_parent, QtDialog *_dialog);
   virtual ~FileQtQuery();
   virtual bool handle();
+
+public slots:
+  void onUpdate();
+  void showFileDialog();
+
 private:
   QBoxLayout *parent;
@@ -193,9 +250,12 @@
   QLineEdit *filenameLineEdit;
   QPushButton *filedialogButton;
+  QFileDialog *theFileDialog;
+  QtDialog *dialog;
 
   FileQtQueryPipe *pipe;
 };
 
-class QtDialog::FilesQtQuery : public Dialog::FilesQuery {
+class QtDialog::FilesQtQuery : public QWidget, public Dialog::FilesQuery {
+  Q_OBJECT
 public:
   FilesQtQuery(Parameter<std::vector< boost::filesystem::path> > &, std::string _title, QBoxLayout *_parent, QtDialog *_dialog);
@@ -206,17 +266,27 @@
   void AddInteger();
   void RemoveInteger();
-private:
-  QBoxLayout *parent;
-  QBoxLayout *thisLayout;
-  QLabel *titleLabel;
+
+public slots:
+  void onUpdate();
+
+private:
+  QBoxLayout *parent;
+  QBoxLayout *thisLayout;
+  QLabel *titleLabel;
+  QtDialog *dialog;
 
   QtQueryListPipe<boost::filesystem::path> *pipe;
 };
 
-class QtDialog::IntQtQuery : public Dialog::IntQuery {
+class QtDialog::IntQtQuery : public QWidget, public Dialog::IntQuery {
+  Q_OBJECT
 public:
   IntQtQuery(Parameter<int> &, std::string _title,QBoxLayout *_parent,QtDialog *_dialog);
   virtual ~IntQtQuery();
   virtual bool handle();
+
+public slots:
+  void onUpdate(int);
+
 private:
   QBoxLayout *parent;
@@ -224,9 +294,11 @@
   QLabel *titleLabel;
   QSpinBox *inputBox;
+  QtDialog *dialog;
 
   IntQtQueryPipe *pipe;
 };
 
-class QtDialog::IntsQtQuery : public Dialog::IntsQuery {
+class QtDialog::IntsQtQuery : public QWidget, public Dialog::IntsQuery {
+  Q_OBJECT
 public:
   IntsQtQuery(Parameter<std::vector<int> > &, std::string _title,QBoxLayout *_parent,QtDialog *_dialog);
@@ -237,17 +309,27 @@
   void AddInteger();
   void RemoveInteger();
-private:
-  QBoxLayout *parent;
-  QBoxLayout *thisLayout;
-  QLabel *titleLabel;
+
+public slots:
+  void onUpdate();
+
+private:
+  QBoxLayout *parent;
+  QBoxLayout *thisLayout;
+  QLabel *titleLabel;
+  QtDialog *dialog;
 
   QtQueryListPipe<int> *pipe;
 };
 
-class QtDialog::MoleculeQtQuery : public Dialog::MoleculeQuery {
+class QtDialog::MoleculeQtQuery : public QWidget, public Dialog::MoleculeQuery {
+  Q_OBJECT
 public:
   MoleculeQtQuery(Parameter<const molecule *> &, std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
   virtual ~MoleculeQtQuery();
   virtual bool handle();
+
+public slots:
+  void onUpdate(int);
+
 private:
   QBoxLayout *parent;
@@ -255,13 +337,19 @@
   QLabel *titleLabel;
   QComboBox *inputBox;
+  QtDialog *dialog;
 
   MoleculeQtQueryPipe *pipe;
 };
 
-class QtDialog::MoleculesQtQuery : public Dialog::MoleculesQuery {
+class QtDialog::MoleculesQtQuery : public QWidget, public Dialog::MoleculesQuery {
+  Q_OBJECT
 public:
   MoleculesQtQuery(Parameter<std::vector<const molecule *> > &, std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
   virtual ~MoleculesQtQuery();
   virtual bool handle();
+
+public slots:
+  void onUpdate();
+
 private:
   QBoxLayout *parent;
@@ -269,13 +357,19 @@
   QLabel *titleLabel;
   QComboBox *inputBox;
+  QtDialog *dialog;
 
   MoleculesQtQueryPipe *pipe;
 };
 
-class QtDialog::StringQtQuery : public Dialog::StringQuery {
+class QtDialog::StringQtQuery : public QWidget, public Dialog::StringQuery {
+  Q_OBJECT
 public:
   StringQtQuery(Parameter<std::string> &, std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
   virtual ~StringQtQuery();
   virtual bool handle();
+
+public slots:
+  void onUpdate(const QString&);
+
 private:
   QBoxLayout *parent;
@@ -283,13 +377,19 @@
   QLabel *titleLabel;
   QLineEdit *inputBox;
+  QtDialog *dialog;
 
   StringQtQueryPipe *pipe;
 };
 
-class QtDialog::StringsQtQuery : public Dialog::StringsQuery {
+class QtDialog::StringsQtQuery : public QWidget, public Dialog::StringsQuery {
+  Q_OBJECT
 public:
   StringsQtQuery(Parameter<std::vector<std::string> > &, std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
   virtual ~StringsQtQuery();
   virtual bool handle();
+
+public slots:
+  void onUpdate();
+
 private:
   QBoxLayout *parent;
@@ -297,13 +397,19 @@
   QLabel *titleLabel;
   QLineEdit *inputBox;
+  QtDialog *dialog;
 
   StringsQtQueryPipe *pipe;
 };
 
-class QtDialog::UnsignedIntQtQuery : public Dialog::UnsignedIntQuery {
+class QtDialog::UnsignedIntQtQuery : public QWidget, public Dialog::UnsignedIntQuery {
+  Q_OBJECT
 public:
   UnsignedIntQtQuery(Parameter<unsigned int> &, std::string _title,QBoxLayout *_parent,QtDialog *_dialog);
   virtual ~UnsignedIntQtQuery();
   virtual bool handle();
+
+public slots:
+  void onUpdate(unsigned int);
+
 private:
   QBoxLayout *parent;
@@ -311,9 +417,11 @@
   QLabel *titleLabel;
   QSpinBox *inputBox;
+  QtDialog *dialog;
 
   UnsignedIntQtQueryPipe *pipe;
 };
 
-class QtDialog::UnsignedIntsQtQuery : public Dialog::UnsignedIntsQuery {
+class QtDialog::UnsignedIntsQtQuery : public QWidget, public Dialog::UnsignedIntsQuery {
+  Q_OBJECT
 public:
   UnsignedIntsQtQuery(Parameter<std::vector<unsigned int> > &, std::string _title,QBoxLayout *_parent,QtDialog *_dialog);
@@ -324,8 +432,13 @@
   void AddInteger();
   void RemoveInteger();
-private:
-  QBoxLayout *parent;
-  QBoxLayout *thisLayout;
-  QLabel *titleLabel;
+
+public slots:
+  void onUpdate();
+
+private:
+  QBoxLayout *parent;
+  QBoxLayout *thisLayout;
+  QLabel *titleLabel;
+  QtDialog *dialog;
 
   QtQueryListPipe<unsigned int> *pipe;
@@ -333,9 +446,16 @@
 
 
-class QtDialog::VectorQtQuery : public Dialog::VectorQuery {
+class QtDialog::VectorQtQuery : public QWidget, public Dialog::VectorQuery {
+  Q_OBJECT
 public:
   VectorQtQuery(Parameter<Vector> &, std::string title,QBoxLayout *,QtDialog *);
   virtual ~VectorQtQuery();
   virtual bool handle();
+
+public slots:
+  void onUpdateX(double);
+  void onUpdateY(double);
+  void onUpdateZ(double);
+
 private:
   QBoxLayout *parent;
@@ -348,13 +468,19 @@
   QDoubleSpinBox *coordInputY;
   QDoubleSpinBox *coordInputZ;
+  QtDialog *dialog;
 
   VectorQtQueryPipe *pipe;
 };
 
-class QtDialog::VectorsQtQuery : public Dialog::VectorsQuery {
+class QtDialog::VectorsQtQuery : public QWidget, public Dialog::VectorsQuery {
+  Q_OBJECT
 public:
   VectorsQtQuery(Parameter<std::vector<Vector> > &, std::string title,QBoxLayout *,QtDialog *);
   virtual ~VectorsQtQuery();
   virtual bool handle();
+
+public slots:
+  void onUpdate();
+
 private:
   QBoxLayout *parent;
@@ -365,13 +491,19 @@
   QLabel *coordLabel;
   QDoubleSpinBox *coordInput;
+  QtDialog *dialog;
 
   VectorsQtQueryPipe *pipe;
 };
 
-class QtDialog::RandomNumberDistribution_ParametersQtQuery : public Dialog::RandomNumberDistribution_ParametersQuery {
+class QtDialog::RandomNumberDistribution_ParametersQtQuery : public QWidget, public Dialog::RandomNumberDistribution_ParametersQuery {
+  Q_OBJECT
 public:
   RandomNumberDistribution_ParametersQtQuery(Parameter<RandomNumberDistribution_Parameters> &, std::string title,QBoxLayout *,QtDialog *);
   virtual ~RandomNumberDistribution_ParametersQtQuery();
   virtual bool handle();
+
+public slots:
+  void onUpdate();
+
 private:
   QBoxLayout *parent;
@@ -380,4 +512,5 @@
   QTextEdit *inputBox;
   QPushButton *okButton;
+  QtDialog *dialog;
 
   RandomNumberDistribution_ParametersQtQueryPipe *pipe;
Index: src/UIElements/Qt4/Query/RandomNumberDistribution_ParametersQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/RandomNumberDistribution_ParametersQtQuery.cpp	(revision b3a54d297c531a6a0c32ca19afe7061e11492b31)
+++ src/UIElements/Qt4/Query/RandomNumberDistribution_ParametersQtQuery.cpp	(revision 7c99210d342dfb64d6b9787241278d8bfdd2ba58)
@@ -33,5 +33,6 @@
 QtDialog::RandomNumberDistribution_ParametersQtQuery::RandomNumberDistribution_ParametersQtQuery(Parameter<RandomNumberDistribution_Parameters> &_param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
     Dialog::RandomNumberDistribution_ParametersQuery(_param, _title),
-    parent(_parent)
+    parent(_parent),
+    dialog(_dialog)
 {
   thisLayout = new QHBoxLayout();
@@ -51,5 +52,5 @@
 
   pipe = new RandomNumberDistribution_ParametersQtQueryPipe(temp,_dialog, inputBox);
-  connect(okButton,SIGNAL(clicked()),pipe,SLOT(update()));
+  connect(okButton,SIGNAL(clicked()),this,SLOT(onUpdate()));
 }
 
@@ -57,4 +58,12 @@
 {
   delete pipe;
+}
+
+void QtDialog::RandomNumberDistribution_ParametersQtQuery::onUpdate() {
+  QString data = inputBox->toPlainText();
+  std::stringstream text(data.toStdString());
+  // TODO: check error
+  //text >> temp;
+  dialog->update();
 }
 
Index: src/UIElements/Qt4/Query/RealSpaceMatrixQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/RealSpaceMatrixQtQuery.cpp	(revision b3a54d297c531a6a0c32ca19afe7061e11492b31)
+++ src/UIElements/Qt4/Query/RealSpaceMatrixQtQuery.cpp	(revision 7c99210d342dfb64d6b9787241278d8bfdd2ba58)
@@ -32,5 +32,6 @@
 QtDialog::RealSpaceMatrixQtQuery::RealSpaceMatrixQtQuery(Parameter<RealSpaceMatrix> &_param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
     Dialog::RealSpaceMatrixQuery(_param, _title),
-    parent(_parent)
+    parent(_parent),
+    dialog(_dialog)
 {
   thisLayout = new QHBoxLayout();
@@ -59,5 +60,5 @@
   thisLayout->addWidget(inputTable);
 
-  connect(inputTable,SIGNAL(cellChanged(int,int)),pipe,SLOT(update(int,int)));
+  connect(inputTable,SIGNAL(cellChanged(int,int)),this,SLOT(onUpdate(int,int)));
 }
 
@@ -65,4 +66,10 @@
 {
   delete pipe;
+}
+
+void QtDialog::RealSpaceMatrixQtQuery::onUpdate(int row, int column)
+{
+  temp.at(row, column) = inputTable->item(row, column)->text().toDouble();
+  dialog->update();
 }
 
Index: src/UIElements/Qt4/Query/StringQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/StringQtQuery.cpp	(revision b3a54d297c531a6a0c32ca19afe7061e11492b31)
+++ src/UIElements/Qt4/Query/StringQtQuery.cpp	(revision 7c99210d342dfb64d6b9787241278d8bfdd2ba58)
@@ -30,5 +30,6 @@
 QtDialog::StringQtQuery::StringQtQuery(Parameter<std::string> &_param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
     Dialog::StringQuery(_param, _title),
-    parent(_parent)
+    parent(_parent),
+    dialog(_dialog)
 {
   temp = "";
@@ -44,5 +45,5 @@
   pipe = new StringQtQueryPipe(temp,_dialog);
   pipe->update(inputBox->text());
-  connect(inputBox,SIGNAL(textChanged(const QString&)),pipe,SLOT(update(const QString&)));
+  connect(inputBox,SIGNAL(textChanged(const QString&)),this,SLOT(onUpdate(const QString&)));
 }
 
@@ -50,4 +51,9 @@
 {
   delete pipe;
+}
+
+void QtDialog::StringQtQuery::onUpdate(const QString& newText) {
+  temp = newText.toStdString();
+  dialog->update();
 }
 
Index: src/UIElements/Qt4/Query/StringsQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/StringsQtQuery.cpp	(revision b3a54d297c531a6a0c32ca19afe7061e11492b31)
+++ src/UIElements/Qt4/Query/StringsQtQuery.cpp	(revision 7c99210d342dfb64d6b9787241278d8bfdd2ba58)
@@ -32,5 +32,6 @@
 QtDialog::StringsQtQuery::StringsQtQuery(Parameter<std::vector<std::string> > &_param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
     Dialog::StringsQuery(_param, _title),
-    parent(_parent)
+    parent(_parent),
+    dialog(_dialog)
 {
   QHBoxLayout * thisHLayout = new QHBoxLayout();
@@ -71,4 +72,8 @@
 }
 
+void QtDialog::StringsQtQuery::onUpdate() {
+  dialog->update();
+}
+
 // All values besides the empty std::string are valid
 bool QtDialog::StringsQtQuery::handle()
Index: src/UIElements/Qt4/Query/UnsignedIntQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/UnsignedIntQtQuery.cpp	(revision b3a54d297c531a6a0c32ca19afe7061e11492b31)
+++ src/UIElements/Qt4/Query/UnsignedIntQtQuery.cpp	(revision 7c99210d342dfb64d6b9787241278d8bfdd2ba58)
@@ -30,5 +30,6 @@
 QtDialog::UnsignedIntQtQuery::UnsignedIntQtQuery(Parameter<unsigned int> &_param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
     Dialog::UnsignedIntQuery(_param, _title),
-    parent(_parent)
+    parent(_parent),
+    dialog(_dialog)
 {
   temp = 0;
@@ -45,5 +46,5 @@
   pipe = new UnsignedIntQtQueryPipe(temp,_dialog);
   pipe->update(inputBox->value());
-  connect(inputBox,SIGNAL(valueChanged(unsigned int)),pipe,SLOT(update(unsigned int)));
+  connect(inputBox,SIGNAL(valueChanged(unsigned int)),this,SLOT(onUpdate(unsigned int)));
 }
 
@@ -51,4 +52,9 @@
 {
   delete pipe;
+}
+
+void QtDialog::UnsignedIntQtQuery::onUpdate(unsigned int newUnsignedInt) {
+  temp = newUnsignedInt;
+  dialog->update();
 }
 
Index: src/UIElements/Qt4/Query/UnsignedIntsQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/UnsignedIntsQtQuery.cpp	(revision b3a54d297c531a6a0c32ca19afe7061e11492b31)
+++ src/UIElements/Qt4/Query/UnsignedIntsQtQuery.cpp	(revision 7c99210d342dfb64d6b9787241278d8bfdd2ba58)
@@ -32,5 +32,6 @@
 QtDialog::UnsignedIntsQtQuery::UnsignedIntsQtQuery(Parameter<std::vector<unsigned int> > &_param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
     Dialog::UnsignedIntsQuery(_param, _title),
-    parent(_parent)
+    parent(_parent),
+    dialog(_dialog)
 {
   QHBoxLayout * thisHLayout = new QHBoxLayout();
@@ -72,4 +73,8 @@
 }
 
+void QtDialog::UnsignedIntsQtQuery::onUpdate() {
+  dialog->update();
+}
+
 bool QtDialog::UnsignedIntsQtQuery::handle() {
   if (param.isValid(temp)){
Index: src/UIElements/Qt4/Query/VectorQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/VectorQtQuery.cpp	(revision b3a54d297c531a6a0c32ca19afe7061e11492b31)
+++ src/UIElements/Qt4/Query/VectorQtQuery.cpp	(revision 7c99210d342dfb64d6b9787241278d8bfdd2ba58)
@@ -31,5 +31,6 @@
 QtDialog::VectorQtQuery::VectorQtQuery(Parameter<Vector> &_param, std::string title, QBoxLayout *_parent,QtDialog *_dialog) :
     Dialog::VectorQuery(_param, title),
-    parent(_parent)
+    parent(_parent),
+    dialog(_dialog)
 {
   temp = Vector(0, 0, 0);
@@ -66,7 +67,7 @@
   pipe = new VectorQtQueryPipe(temp,_dialog,inputBox);
   //pipe->update(coordInput->value());
-  connect(coordInputX,SIGNAL(valueChanged(double)),pipe,SLOT(updateX(double)));
-  connect(coordInputY,SIGNAL(valueChanged(double)),pipe,SLOT(updateY(double)));
-  connect(coordInputZ,SIGNAL(valueChanged(double)),pipe,SLOT(updateZ(double)));
+  connect(coordInputX,SIGNAL(valueChanged(double)),this,SLOT(onUpdateX(double)));
+  connect(coordInputY,SIGNAL(valueChanged(double)),this,SLOT(onUpdateY(double)));
+  connect(coordInputZ,SIGNAL(valueChanged(double)),this,SLOT(onUpdateZ(double)));
   parent->addLayout(mainLayout);
 }
@@ -74,4 +75,19 @@
 QtDialog::VectorQtQuery::~VectorQtQuery()
 {}
+
+void QtDialog::VectorQtQuery::onUpdateX(double newDouble) {
+  temp[0] = newDouble;
+  dialog->update();
+}
+
+void QtDialog::VectorQtQuery::onUpdateY(double newDouble) {
+  temp[1] = newDouble;
+  dialog->update();
+}
+
+void QtDialog::VectorQtQuery::onUpdateZ(double newDouble) {
+  temp[2] = newDouble;
+  dialog->update();
+}
 
 bool QtDialog::VectorQtQuery::handle() {
Index: src/UIElements/Qt4/Query/VectorsQtQuery.cpp
===================================================================
--- src/UIElements/Qt4/Query/VectorsQtQuery.cpp	(revision b3a54d297c531a6a0c32ca19afe7061e11492b31)
+++ src/UIElements/Qt4/Query/VectorsQtQuery.cpp	(revision 7c99210d342dfb64d6b9787241278d8bfdd2ba58)
@@ -31,5 +31,6 @@
 QtDialog::VectorsQtQuery::VectorsQtQuery(Parameter<std::vector<Vector> > &_param, std::string title, QBoxLayout *_parent,QtDialog *_dialog) :
     Dialog::VectorsQuery(_param, title),
-    parent(_parent)
+    parent(_parent),
+    dialog(_dialog)
 {
   mainLayout= new QHBoxLayout();
@@ -56,4 +57,8 @@
 {}
 
+void QtDialog::VectorsQtQuery::onUpdate() {
+  dialog->update();
+}
+
 bool QtDialog::VectorsQtQuery::handle() {
   if (param.isValid(temp)){
