-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmain.cpp
More file actions
48 lines (45 loc) · 1.24 KB
/
main.cpp
File metadata and controls
48 lines (45 loc) · 1.24 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#include "mainwindow.h"
#include <QApplication>
#include<QtDebug>
#include<QtSql>
#include<QSqlDatabase>
#include<QSqlQuery>
#include<QSqlQuery>
#include<QVariant>
#include<QSqlError>
#include<QString>
#include<loginwidget.h>
#include<QVector>
#include<QString>
#include<QDebug>
#include<QTextCodec>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
LogInWidget *loginwidget=new LogInWidget();
loginwidget->show();
QTextCodec::setCodecForLocale(QTextCodec::codecForName("UTF-8"));
//Data *data=new Data();
//QVector<QString> keys;
//last
//keys.push_back(QString("202015"));
//data->getFundMsgFromApi(keys);
return a.exec();
}
/*
QSqlDatabase db=QSqlDatabase::addDatabase("QODBC");
db.setDatabaseName("E_Chain_Database");
db.setUserName("sa");
db.setHostName("192.168.56.1");
db.setPassword("9638527410.s");
if(!db.open()){
qDebug()<<"fail to open!"<<endl<<db.lastError();
}else{
qDebug()<<"successful!"<<endl;
QSqlQuery query;
query.exec("create table %1(id integer primary key, name nvarchar(20),age int)").arg(test);
query.exec("insert into test values(1,'小明',14)");
//此行用于测试pull功能
db.close();
}
*/