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();
Second *s = new Second();
s->exec();
To copy to clipboard, switch view to plain text mode
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!");
MainWin *mwin = new MainWin();
mwin->function("Add This!");
To copy to clipboard, switch view to plain text mode
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
ui.MainWindow = mwin; //mwin is passed to the main window from second window
To copy to clipboard, switch view to plain text mode
This gives me an error saying: invalid use of Ui::MainWindow::MainWindow
How do I get around this??
Thanks.
Bookmarks