使用Qt显示GIF格式动画
来源:互联网 发布:linux装mysql数据库 编辑:程序博客网 时间:2024/06/05 17:42
I put this here in case someone other than me runs into the same problem.
Problem
The GIF would not load and isValid()
returns false
.
Code
// Load animated GIFQMovie* movie = new QMovie("foo.gif");// Make sure the GIF was loaded correctlyif (!movie->isValid()) { // Something went wrong :(}// Play GIFQLabel* label = new QLabel(this);label->setMovie(movie);movie->start();
Solution
To solve this, I had to put Qt's GIF-plugin qgif4.dll
in a folder named imageformats
next to my exe to be able to use GIFs.
The dll can be found under /plugins/imageformats/qgif4.dll
0 0
- 使用Qt显示GIF格式动画
- iOS GIF 格式动画 图片显示
- iOS GIF 格式动画 图片显示
- iOS GIF 格式动画 图片显示
- QT 显示gif 和 flash 动画技巧
- QT开发之gif动画显示
- BCB下使用TGifImage显示GIF动画
- Delphi使用Image显示gif动画
- GDI+显示GIF动画
- GDI+显示GIF动画
- GDI+显示GIF动画
- GDI+显示GIF动画
- GDI+显示GIF动画
- 显示GIF动画
- GDI+显示GIF动画
- Delphi2007 显示GIF 动画
- GDI+显示GIF动画
- GIF动画显示类
- 网页上制作动画效果的方法及优势劣势
- 术语的积累
- Oracle12c中性能优化&功能增强新特性之重大突破——内存列存储新特性
- linux静态库的生成与使用(转)
- tableviewcell长按删除行
- 使用Qt显示GIF格式动画
- [CSS3 Practice] Slides Effect With Pure CSS3
- 使用 CAS 在 Tomcat 中实现单点登录
- 使用隐式意图调用系统拨号,呼叫程序
- 局域网中同步时间
- linux -bash: jps: command not found
- java实现html转pdf,支持中文,css以及中文换行
- 图像处理相关的重要期刊汇总
- JavaScript练习一之键盘敲击获取关键词