Hi
I'm learning c++ in linux but already I've worked with Visual Basic and now I have a problem in C++:
I have two classes in two separated files (mainwindow.h, mainwindow.cpp and cmd.h, cmd.cpp). In mainwindow class I have the following object in mainwindow.cpp:
QMdiArea *mdiArea = new QMdiArea(this);
QMdiArea is a class for creating mdi windows and by the following code i can create a subwindow:
mdiArea->addsubwindow(QWidget);
there is no problem until i want to access mdiArea object from cmd class (that is in a separated file) and create a subwindow by the above code but i don't know how to do it.
should I create a global object or something else?
let me know your opinion.
thank you and sorry for my bad language!