You may want to use QMAKE_CXXFLAGS, but it only passes the arguments to g++ at the compiling stage(i.e., g++ -c …) not at the linking stage.
To pass arguments to the linker, you should use the QMAKE_LFLAGS variable in the .pro file such as
QMAKE_LFLAGS += -Wl,–enable-auto-import
This will add the linker argument “-Wl,–enable-auto-import” to the LFLAGS variable in Makefile.Debug