Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "mainwindow.h"
- #include <QSplashScreen>
- #include <QTimer>
- #include <QApplication>
- #include <QThread>
- #include <QMovie>
- #include <QLabel>
- #include <unistd.h>
- int main(int argc, char *argv[])
- {
- QApplication a(argc, argv);
- QMovie *movie = new QMovie("/home/ubuntu/Pictures/giphy.gif");
- QLabel *processLabel = new QLabel(NULL);
- processLabel->setMovie(movie);
- movie->start();
- processLabel->setWindowFlags(Qt::FramelessWindowHint);
- processLabel->setAlignment(Qt::AlignCenter);
- processLabel->show();
- // QPixmap pixmap("/home/ubuntu/Pictures/giphy.gif");
- // QSplashScreen splash(pixmap, Qt::WindowStaysOnTopHint);
- // splash.setCursor(Qt::BusyCursor);
- // splash.show();
- // QTimer::singleShot(5000, &splash, &QWidget::close); // keep displayed for 5 seconds
- // MainWindow w;
- // w.show();
- MainWindow w;
- // w.show();
- QTimer::singleShot(2500,processLabel,SLOT(close()));
- QTimer::singleShot(2500,&w,SLOT(show()));
- return a.exec();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement