Old question, I know. But nowadays, you can simply use
CONFIG += force_debug_info
to get debug symbols even in release mode. When you use QMake via the command line, I usually do this to get a release build with debug info:
qmake CONFIG+=release CONFIG+=force_debug_info path/to/sources
this will enable below conditions of Qt5/mkspecs/features/default_post.prf:
force_debug_info|debug: CONFIG += debug_info
force_debug_info {
QMAKE_CFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO
QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO
QMAKE_LFLAGS_RELEASE = $$QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO
}
which would even work for Qt 4.x but we would need to manually append above conditions into default_post.prf for Qt 4.x