1、播放动画
QAxWidget *flash = new QAxWidget(, ); //QAxWidget使用的是ActiveX插件 flash->resize(, ); //设置该控件的初始大小 flash->setControl(QString::fromUtf8("{d27cdb6e-ae6d-11cf-96b8-444553540000}")); //设定控制器 flash->dynamicCall("LoadMovie(long,string)", , "D:\\flash1.swf"); // flash->setWindowFlags(Qt::FramelessWindowHint); //去除边框 flash->show(); QTime t; t.start(); while (t.elapsed() < ) {
QApplication::processEvents();
}
flash->close();
flash->close();
2、图+消息提示
QApplication app(argc, argv); QPixmap pixmap(":/splash.png"); QSplashScreen splash(pixmap); splash.show(); splash.showMessage(QStringLiteral("正在初始化..."));//消息提示 app.processEvents(); ... QMainWindow window; window.show(); splash.finish(&window);