How to call a function from another window?
Hi,
I've a main window, and I'opening a new window from it:
Code:
void MainWindow::slotNowyTransport(){
OFormNowyTransport = new FormNowyTransport(this);
OFormNowyTransport->show();
}
and I've another function:
Code:
void MainWindow::refresh(){
refresh_list();
}
When i've opened a OFormNowyTransport a fill the form, and call FormNowyTransport::add().
There is (in FormNowyTransport::add() function) on the end this->close(); before I'ld like to call a MainWindow::refresh() to refresh the list.
How can I do that?
Re: How to call a function from another window?
if i understand right you have a list in your main form and you fill this list in FormNowyTransport.
I would do it with a list which is initialized in main form and passed it by reference to FormNowyTransport
Quote:
OFormNowyTransport = new FormNowyTransport(this,&"someList")
or create a signal slot relaltion in mainform
Quote:
connect(OFormNowyTransport,close,this,"listtransfo rm")