QCoreApplication is not part of QtGui, but QApplication is.
Try using that.