noo/client/main.cpp

30 lines
678 B
C++
Raw Normal View History

2018-09-24 22:25:14 +03:00
#include "mainwindow.h"
#include <QApplication>
#include <QLayout>
2019-11-13 14:30:18 +02:00
#include <QFileInfo>
#include <QDir>
2018-10-05 18:20:40 +03:00
#include "settings.h"
#include "helper.h"
2018-09-24 22:25:14 +03:00
int main(int argc, char *argv[])
{
2018-10-05 18:20:40 +03:00
QApplication a(argc, argv);
2019-01-13 14:11:00 +03:00
helper::theme::applyCurrent(Settings::instance());
2018-09-24 22:25:14 +03:00
2021-02-18 21:44:13 +02:00
// Path to database.
QString path = Settings::instance().getDatabasePath();
2019-08-17 22:03:17 +03:00
QString folder = QFileInfo(path).absoluteDir().path();
Storage::instance().setPath(path);
2018-10-05 18:20:40 +03:00
MainWindow w;
w.layout()->invalidate();
2018-09-24 22:25:14 +03:00
2018-10-05 18:20:40 +03:00
w.setAttribute(Qt::WA_WState_ExplicitShowHide, false);
w.setAttribute(Qt::WA_WState_Hidden, true);
w.show();
return a.exec();
2018-09-24 22:25:14 +03:00
}