My project is set to be Mtd like as follow: QMAKE_CFLAGS_DEBUG =-Zi -MTd QMAKE_CXXFLAGS_DEBUG = -Zi -MTd
and I tried to convert QString to const char* like this: QStr