I've figured out a solution now. I use getter and setter functions. I put the functions in public of both control_window and configuration_window and define it in the Source files.
Header configuration_window:
public:
public:
QProcess *process() const;
void setProcess(QProcess *process);
To copy to clipboard, switch view to plain text mode
Header control_window:
public:
public:
QProcess *process() const;
void setProcess(QProcess *process);
To copy to clipboard, switch view to plain text mode
Source configuration_window:
QProcess *configuration_window
::process() const {
return m_opc_ua_server;
}
void configuration_window
::setProcess(QProcess *process
) {
m_opc_ua_server = process;
}
QProcess *configuration_window::process() const
{
return m_opc_ua_server;
}
void configuration_window::setProcess(QProcess *process)
{
m_opc_ua_server = process;
}
To copy to clipboard, switch view to plain text mode
Source control_window:
QProcess *control_window
::process() const {
return m_opc_ua_server;
}
void control_window
::setProcess(QProcess *process
) {
m_opc_ua_server = process;
}
QProcess *control_window::process() const
{
return m_opc_ua_server;
}
void control_window::setProcess(QProcess *process)
{
m_opc_ua_server = process;
}
To copy to clipboard, switch view to plain text mode
In the Click Event that opens the next window I call the set function
m_control_window->setProcess(process());
m_control_window->setProcess(process());
To copy to clipboard, switch view to plain text mode
Now I can use m_opc_ua_server in control_window.
Bookmarks