Lykurg is correct, you can specify a namespace when you compile Qt, and these macros will use that namespace if its defined, or just expand to nothingness.

The rest is standard C++ - if you have no requirement to access the members of the object (QPushButton in this case), then using a forward reference is faster for the compiler to compile than #include'ing its header (apart from maybe when you use pre-compiled headers). If you look in the Qt source, forward declarations are used a lot so that an object doesn't include everything it depends on unless you really need it.