-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
33 lines (30 loc) · 820 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
32
33
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QApplication>
#include <QtSql/qsqldatabase.h>
#include <QtSql/qsqlquery.h>
#include <Qtsql/QSqlDatabase>
#include <QSqlQuery>
#include <string>
#include <QDataStream>
#include <QDebug>
#include <QMessageBox>
#include <QTextCodec>
#include <QTextStream>
#include <QtSql/qsqldriver.h>
#include <stdlib.h>
using namespace std;
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QTextCodec::setCodecForLocale(QTextCodec::codecForName("UTF-8"));
if(!createConnection("root", "5183685")) {
qDebug() << "Error!";
return 1;
}
qDebug() << "Successfully Connected!";
MainWindow w;
w.setWindowTitle(QStringLiteral("图书管理系统"));
w.show();
return a.exec();
}