A: 

I think you might have forgotten to create Makefile based on new .pro file. Just run:

qmake yourproject.pro

If it still fails you can edit generated Makefile and add this flag.

EDIT: New solution. Add -std=c++0x directly to Makefile. There's a line similar to this:

CXXFLAGS = -pipe -g -gdwarf-2 -arch i386 -Wall -W $(DEFINES)

Just add -std=c++0x so the result is:

CXXFLAGS = -pipe -g -gdwarf-2 -arch i386 -Wall -std=c++0x -W $(DEFINES)
Jacek
I'll give it a try and see what happens. Thanks.
andand
@Jacek: Well, I tried it and the new flags didn't make it into the Makefile. Thanks anyway.
andand
Have you tried my edited solution?
Jacek
@jacek: Just noticed your edit. I had done something similar when I first encountered the problem, but QtCreator complained that the Makefile was changed (presumably because qmake didn't build it) and offered to rebuild it. I tried both answering "no" and "yes", but each time with the same result... of course I used the QtCreator to edit the Makefile, so I'll edit it as you suggest using something else to edit without QtCreator running ... maybe it won't notice ;). I'll give it a try when I get home tonight. Thanks.
andand
@jacek: No joy... Tried it again, and when I used QtCreator to compile, it called qmake which rebuilt the makefiles overwriting them. Thanks. I'll go see what the Qt forums have as a response.
andand
+1  A: 

It boils down to reading the manual. Instead of using CXXFLAGS in the .pro file, you need to use QMAKE_CXXFLAGS as in:

main.cpp:

#include <cinttypes>

int main() { return 0; }

main.pro:

SOURCES += main.cpp
QMAKE_CXXFLAGS += -std=c++0x
andand