Fix Qt5 building error

QT += widgets
QCoreApplication::argc() does not exist in Qt5