If the clear function is within QMainWindow why not put the following in your QMainWindow header file :
extern MainWindow *theApp;
extern MainWindow *theApp;
To copy to clipboard, switch view to plain text mode
and then in your .cpp file for MainWindow, someplace at the top :
MainWindow *theApp; // I'm presuming MainWindow derives from QMainWindow...
MainWindow *theApp; // I'm presuming MainWindow derives from QMainWindow...
To copy to clipboard, switch view to plain text mode
and in your constructor :
theApp = this;
theApp = this;
To copy to clipboard, switch view to plain text mode
This way, you can make calls to the clear function from other classes by :
theApp->clear();
theApp->clear();
To copy to clipboard, switch view to plain text mode
as long as you include the MainWindow header file...
Regards,
Steve
Bookmarks