#include "MainWidget.h" #include #include #include "LoadingDialog.h" using namespace QtCharts; int main(int argc, char *argv[]) { QApplication a(argc, argv); MainWidget windows; // 显示gif图片 /*QLabel label; // 设置无边框 label.setWindowFlag(Qt::FramelessWindowHint); // 设置透明度 label.setWindowOpacity(1); //label.setAttribute(Qt::WA_TranslucentBackground, true); QMovie movie(":/images/images/loading.gif"); label.setMovie(&movie); //label.setText("V1.0"); QTime time; time.start(); movie.start(); label.show(); // 居中显示 int h = (QApplication::desktop()->height()-label.height())/2; int w = (QApplication::desktop()->width()-label.width())/2; label.move(w,h); // 设置延迟时间 while (time.elapsed() < 2300) { QApplication::processEvents(); } // 停止 movie.stop(); label.close();*/ QTime time; time.start(); LoadingDialog *load = new LoadingDialog; load->show(); // 设置延迟时间 while (time.elapsed() < 3000) { QApplication::processEvents(); } // 停止 load->close(); a.setWindowIcon(QIcon(":/images/images/imgSystem/ICON.ico")); windows.show(); return a.exec(); }