Hi there,
I am adding a new class, let say ClassA, to my QT project (in addition to mainwindow.cpp class). ClassA makes a Model, say modelA, of type QStandardItemModel. Then, I need to use modelA in different functions of my main QT class (i.e., all over mainwindow.cpp).
in MainWindow::MainWindow, I do:
ClassA objectA;
objectA.modelA......
This gives me access to modelA in the constructor, but not in other functions in mainwindow.cpp.
How can I make modelA recognized in all mainwindow.cpp functions?
modelA, in the header file of ClassA, is defined under 'public:' already.
Thanks,
Omid
Bookmarks