Hi,

I have a class that tracks strings so essentially TrackedStrings :
QStringList and this contains a list of strings that are being tracked (so
some function from some other class calls it's add(const QString& string).
I need this object as static because I want to access it from anywhere
without having to define it.

Now everytime TrackedStrings.h header is used, it initializes it even
though I have used prevent guard (I checked it by having a break point on
constructer).

What is the best way to use this static TrackedStrings trackedStrings;
object in order to use it from anywhere. Remember, I don't want to
explicitly initialize it (on heap or stack).

Thanks

-- 
Majid Khan
http://www.icplusplus.com
_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to