QPixmap的使用+QSplashScreen的使用
2017-07-15 09:28
489 查看
1.设置窗口运行为图片
效果图:
实现代码:
2.设置窗口运行前的弹框图片提示
效果图:
实现代码:
效果图:
实现代码:
//设置窗口运行为图片--QPixmap的使用 QPixmap pix; pix.load("iocn.png",0,Qt::AvoidDither|Qt::ThresholdDither|Qt::ThresholdAlphaDither); resize(pix.size()); setMask(QBitmap(pix.mask())); void paintEvent(QPaintEvent *event) { QPainter painter(this); painter.drawPixmap(0,0,QPixmap("iocn.png")); }
2.设置窗口运行前的弹框图片提示
效果图:
实现代码:
//设置窗口运行前的弹框图片提示--QSplashScreen的使用 QPixmap pixmap("Qt.png"); QSplashScreen splash(pixmap); splash.show(); a.processEvents(); MainWindow w; w.show(); splash.finish(&w); //MainWindow构造函数中内容 Sleep(3000);//添加#include <windows.h>
相关文章推荐
- winform 使用SplashScreen窗口
- 单纯的使用一张图片,设置为 SplashScreen 的方式我已经使用过了,是有效果的,但是现在我想更进一步的显示出当前程序的状态,如正在初始化设备,这类的状态
- Winform DevExpress控件库(二) 使用SplashScreenManager控件定制程序加载页面
- cordova-plugin-splashscreen插件使用时显示OOM
- Winform DevExpress控件库(二) 使用SplashScreenManager控件定制程序加载页面
- 使用SplashScreenManager控件制作窗口加载动画
- VC:使用VC自带的splash screen控件
- QT QSplashScreen程序启动画面使用心得
- [Silverlight]通过SilverlightLoader使用托管代码创建自定义载入界面(Splash Screen) (上)
- 在DevExpress程序中使用SplashScreenManager控件实现启动闪屏和等待信息窗口
- 使用SplashScreenManager控件定制程序加载页面
- Phonegap splashscreen 配置使用方法
- 使用QSplashScreen做QT程序欢迎画面
- 使用react-native-smart-splash-screen实现启动画面
- 给使用phonegap的Android程序加上splash screen(启动图片 预览图))
- Qt带进度条的启动界面(继承QSplashScreen,然后使用定时器)
- Linux下screen的使用
- screen 使用方法 详解
- 对话 UNIX: 使用 Screen 创建并管理多个 shell
- 【转】使用screen的一些技巧性东西