#include "mainwindow.h"
#include <QApplication>
#include <QTextEdit>
#include <QSplashScreen>
#include<QProgressBar>
#include<QTime>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QSplashScreen splash;
QTime t0;
t0.restart();
splash.setPixmap(QPixmap(":/images/images/logo.png"));
QProgressBar pb(&splash);
QRect rect = splash.rect();
pb.setGeometry(2, rect.height() - 20, rect.width() / 2 - 60, 14);
pb.setRange(0, 3000);
splash.show();
QCoreApplication::processEvents(QEventLoop::AllEvents, 50);
while (t0.elapsed() < 3000)
{
pb.setValue(t0.elapsed());
app.processEvents();
}
pb.setValue(3000);
app.processEvents();
MainWindow w;
w.showMaximized();
splash.finish(&w);
return app.exec();
}