Windsoarer
10th October 2009, 04:57
Hi gurus,
To express it simply, my problem is to access, from different classes, an instance of the object QThing.
It is possible to declare the object as a member variable in one class, and then exchange pointers *pCurrentThing with other classes. However, each time the active instance of the object changes, all the pointers in the other classes need to be updated.
Is there a way to declare a global pointer *g_pCurrentThing, for instance at "main" level, which could be seen by all the classes ? I've been unsuccessful so far.
Hope this is understandable :confused:
Thanks
andre
To express it simply, my problem is to access, from different classes, an instance of the object QThing.
It is possible to declare the object as a member variable in one class, and then exchange pointers *pCurrentThing with other classes. However, each time the active instance of the object changes, all the pointers in the other classes need to be updated.
Is there a way to declare a global pointer *g_pCurrentThing, for instance at "main" level, which could be seen by all the classes ? I've been unsuccessful so far.
Hope this is understandable :confused:
Thanks
andre