Why we use "QT_USE_NAMESPACE" in some of Qt Programs?
In many cases I've seen that people use "QT_USE_NAMESPACE".
I googled it, and couldn't find anything..
What's the purpose of "QT_USE_NAMESPACE" , and why do we use it?
Why there is nothing about it around!!!! :/
You can compile Qt yourself within a namespace, e.g. to use a diffent Qt version within a plugin than the program that loads the plugin uses. More information here: https://wiki.qt.io/Qt_In_Namespace
I have not seen QT_USE_NAMESPACE so far, only QT_BEGIN_NAMESPACE and QT_END_NAMESPACE.
Where did you see QT_USE_NAMESPACE?
Thanks a lot.
It was here in this example:
In Qt source code, you can check
You will find that
#define QT_USE_NAMESPACE using namespace ::QT_NAMESPACE;
Here is the source code, you can find it at line 133