标题:QSplashScreen问题
作者:yangzl
日期:2011-11-01 16:58
内容:
我使用qt creator建立了程序想做个启动画面,但是为什么就是显示不出来呢?
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QPixmap pixmap(":/splash.png");
QSplashScreen splash(pixmap, Qt::WindowStaysOnTopHint);
QTimer::singleShot(3000, &splash, SLOT(close()));
splash.show();app.processEvents();
QmlApplicationViewer viewer;
viewer.setOrientation(QmlApplicationViewer::ScreenOrientationAuto);
viewer.setMainQmlFile(QLatin1String("qml/Application/main.qml"));
viewer.showExpanded();
splash.finish(&viewer);
return app.exec();
}
#1 [yangzl 11-01 17:13]
原来增加了qrc文件就显示出来了,还有个问题就是我怎么能让显示的启动图片旋转一下呢?
#2 回 1楼(yangzl) 的帖子 [wxj120bw 11-02 23:15]
其实gif文件可算一种方式