Chinaunix首页 | 论坛 | 博客
  • 博客访问: 408074
  • 博文数量: 117
  • 博客积分: 5235
  • 博客等级: 大校
  • 技术积分: 1775
  • 用 户 组: 普通用户
  • 注册时间: 2007-09-12 15:51
文章分类

全部博文(117)

文章存档

2012年(9)

2011年(2)

2010年(21)

2009年(13)

2008年(72)

我的朋友

分类: C/C++

2012-02-28 15:50:12

What:
  Show a splash image and some message before the main window loading. QTest can sleep process to check the QSplashScreen.
 
How:
Setup .pro file:
    CONFIG += qtestlib
     #include
  1. int main(int argc, char *argv[])
  2.  {
  3.      QApplication app(argc, argv);
  4.      QPixmap pixmap("splash.png");
  5.      QSplashScreen splash(pixmap);
  6.      splash.show();
  7.      splash->showMessage("Loaded modules"); 
  8.      QTest::qTest(1000); //ms
  9.      QMainWindow window;
  10.      window.show();
  11.      splash.finish(&window);
  12.      return app.exec();
  13.  }
阅读(481) | 评论(0) | 转发(0) |
0

上一篇:QT resource

下一篇:QTranslator

给主人留下些什么吧!~~