int main(int argc, char *argv[]){ QCoreApplication a(argc, argv); QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL"); db.setHostName("LOCALHOST"); db.setDatabaseName("notification"); db.setUserName("user"); db.setPassword("pass"); return a.exec();}