You will need to add
CONFIG += console to your .pro file