-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
40 lines (34 loc) · 969 Bytes
/
main.cpp
File metadata and controls
40 lines (34 loc) · 969 Bytes
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
/*
QMAKE_LFLAGS += -static -static-libgcc
*/
#include <QApplication>
#include <QTableWidgetItem>
#include <qdebug.h>
#include <QLabel>
#include <QHBoxLayout>
#include <QPushButton>
#include <QFile>
#include <QCryptographicHash>
#include <QSettings>
#include <QTextCodec>
#include "mainwindow.h"
#include "passbox.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QTextCodec::setCodecForLocale(QTextCodec::codecForName("UTF-8")); //изменения
QSettings *ini = new QSettings(qApp->applicationDirPath()+"/config.ini",QSettings::IniFormat);
if(!ini->value("CheckBox/passStartBox").toBool()){
PassBox *p = new PassBox;
// p->setAttribute(Qt::WA_DeleteOnClose,true);
p->setFixedSize(315,107);
p->show();
}
else{
MainWindow *wdw = new MainWindow;
// wdw->setAttribute(Qt::WA_DeleteOnClose,true);
wdw->openMain();
}
ini->deleteLater();
return a.exec();
}