-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
31 lines (25 loc) · 771 Bytes
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include "mainwindow.h"
#include <QApplication>
#include <QMessageBox>
#include "connexion.h"
#include <QDebug>
#include "login.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
connexion c;
bool test=c.createconnect();
//MainWindow w1;
login w;
if(test)
{w.show();
QMessageBox::information(nullptr, QObject::tr("database is open"),
QObject::tr("connection successful.\n"
"Click Cancel to exit."), QMessageBox::Cancel);
}
else
QMessageBox::critical(nullptr, QObject::tr("database is not open"),
QObject::tr("connection failed.\n"
"Click Cancel to exit."), QMessageBox::Cancel);
return a.exec();
}