steve.bush
20th March 2011, 08:37
Hi,
So I have a main window. I also have a second window. Lets call them:
main window is MainWin
second window is Second
inside main window, I am doing:
Second *s = new Second();
s->exec();
Now I can see the second window.
I am trying to execute a function inside second window which modifies the main window. So, I want to refresh the main window.
My function in second window:
MainWin *mwin = new MainWin();
mwin->function("Add This!");
Now, this is not reflected in the main window because I am adding it to a new instance of main window.
So, I tried doing this in the main window:
ui.MainWindow = mwin; //mwin is passed to the main window from second window
This gives me an error saying: invalid use of Ui::MainWindow::MainWindow
How do I get around this??
Thanks.
So I have a main window. I also have a second window. Lets call them:
main window is MainWin
second window is Second
inside main window, I am doing:
Second *s = new Second();
s->exec();
Now I can see the second window.
I am trying to execute a function inside second window which modifies the main window. So, I want to refresh the main window.
My function in second window:
MainWin *mwin = new MainWin();
mwin->function("Add This!");
Now, this is not reflected in the main window because I am adding it to a new instance of main window.
So, I tried doing this in the main window:
ui.MainWindow = mwin; //mwin is passed to the main window from second window
This gives me an error saying: invalid use of Ui::MainWindow::MainWindow
How do I get around this??
Thanks.