Skip to content
Snippets Groups Projects
main.cpp 925 B
Newer Older
Mohammad Mahadi Hasan's avatar
Mohammad Mahadi Hasan committed

pospelov's avatar
pospelov committed
#include "mainwindow.h"
#include "SplashScreen.h"
Mohammad Mahadi Hasan's avatar
Mohammad Mahadi Hasan committed

pospelov's avatar
pospelov committed
#include <QApplication>
Mohammad Mahadi Hasan's avatar
Mohammad Mahadi Hasan committed
#include <QDebug>
#include <QTime>
pospelov's avatar
pospelov committed

int main(int argc, char *argv[])
{
Mohammad Mahadi Hasan's avatar
Mohammad Mahadi Hasan committed

pospelov's avatar
pospelov committed
    QApplication a(argc, argv);
Mohammad Mahadi Hasan's avatar
Mohammad Mahadi Hasan committed

    SplashScreen *splash = new SplashScreen(&a);
    splash->show();
    int time = 1000;
    QTime dieTime = QTime::currentTime().addMSecs(1000);
    QTime timer;
    timer.start();
    while( QTime::currentTime() < dieTime )
    {
        splash->setProgress(timer.elapsed()/(time/100));
        QCoreApplication::processEvents( QEventLoop::AllEvents, 100 );
    }

pospelov's avatar
pospelov committed
    MainWindow w;
    w.show();
    splash->finish(&w);
//#ifdef BORNAGAIN_CRASHHANDLER
//    std::cout << "BORNAGAIN_CRASHHANDLER" << std::endl;
//    StackTraceSetup s;
//#endif
Mohammad Mahadi Hasan's avatar
Mohammad Mahadi Hasan committed

//    QVector<double> vector;
//    double d = vector[0]+0.1;
//    qDebug() << "main double:" << d;
Mohammad Mahadi Hasan's avatar
Mohammad Mahadi Hasan committed

//    return a.exec();
Mohammad Mahadi Hasan's avatar
Mohammad Mahadi Hasan committed

    const int r = a.exec();
pospelov's avatar
pospelov committed
}