Hello,
I'm developing a UI that's controlling an external Program. In the Configuration Window, the process gets initialized and started, and I can write to it.

Configuration Window Header:

Qt Code:
  1. #ifndef CONFIGURATION_WINDOW_H
  2. #define CONFIGURATION_WINDOW_H
  3.  
  4. #include <QWidget>
  5. #include <QProcess>
  6.  
  7. class control_window;
  8. class QProcess;
  9.  
  10. namespace Ui {
  11. class configuration_window;
  12. }
  13.  
  14. class configuration_window : public QWidget
  15. {
  16. Q_OBJECT
  17.  
  18. friend class control_window;
  19.  
  20. public:
  21. explicit configuration_window(QWidget *parent = 0);
  22. ~configuration_window();
  23.  
  24. private slots:
  25.  
  26. void on_configuration_window_Exit_clicked();
  27.  
  28. void on_configuration_window_Start_clicked();
  29.  
  30. private:
  31. Ui::configuration_window *ui;
  32.  
  33. control_window *m_controlWindow;
  34.  
  35. QProcess *m_opc_ua_server;
  36. };
  37.  
  38. #endif // CONFIGURATION_WINDOW_H
To copy to clipboard, switch view to plain text mode 

Configuration Window Source:

Qt Code:
  1. #include "configuration_window.h"
  2. #include "ui_configuration_window.h"
  3. #include "control_window.h"
  4. #include <QMessageBox>
  5. #include <QProcess>
  6. #include <QDebug>
  7.  
  8. configuration_window::configuration_window(QWidget *parent) :
  9. QWidget(parent),
  10. ui(new Ui::configuration_window)
  11. {
  12. ui->setupUi(this);
  13.  
  14. m_opc_ua_server = new QProcess(this);
  15.  
  16. m_controlWindow = new control_window();
  17. }
  18.  
  19. configuration_window::~configuration_window()
  20. {
  21. delete ui;
  22. }
  23.  
  24. void configuration_window::on_configuration_window_Exit_clicked()
  25. {
  26. QApplication::quit();
  27. }
  28.  
  29. void configuration_window::on_configuration_window_Start_clicked()
  30. {
  31. m_opc_ua_server->setProgram("test14/testprojekt.exe");
  32.  
  33. m_opc_ua_server->start(QIODevice::ReadWrite);
  34.  
  35. this->close();
  36. m_controlWindow->show();
  37. }
To copy to clipboard, switch view to plain text mode 

In order to be able to write to it in the following windows, I have to initialize the Process. How can I do that?
If there are easier solutions to write to the Process, please tell me.