#ifndef CONNEXION_H
#define CONNEXION_H

#include <QtSql>
#include <QSqlDatabase>
#include <QMessageBox>
#include "connexion.h"

//lance la connection a DrTuxTest
bool CreateConnection() 
{
QSqlDatabase db = QSqlDatabase :: addDatabase("QMYSQL");
db.setHostName("localhost");
db.setDatabaseName("DrTuxTest");
db.setUserName("root");
db.setPassword("");
if (!db.open()) {
	QMessageBox::critical(0,"Erreur ouverture de base", db.lastError().text());
	return false;
}
return true;
}

#endif
