Qt 为 QMovie 部署 qgif4.dll 插件

发布于 2024-10-08 12:43:52 字数 497 浏览 4 评论 0原文

我在 Windows 上部署显示 gif 动画的应用程序时遇到问题。为此,我使用 QMovie,如果我从 QtCreator 启动它,它可以正常工作。我收集了运行该应用程序所需的文件,并且可以正常启动它,但 gif 不会显示。

我阅读了此页面并得出结论,我需要添加qgif4.dll 插件位于 qt/bin/plugins/imageformats 中。我尝试将其复制到应用程序旁边的 plugins 文件夹中,还有 plugins/imageformats,但它仍然不起作用。我还尝试

QApplication::addLibraryPath(QDir::currentPath());

并将 qgif4.dll 文件复制到我的可执行文件旁边 - 但没有成功。我该如何解决这个问题?

I'm having problems with deploying an application on Windows that displays an animated gif. For this purpose I use a QMovie and it works fine if I launch it from QtCreator. I gathered the files that are needed to run the application, and I can launch it just fine, but the gif won't show up.

I read this page and came to the conclusion that I need to add the qgif4.dll plugin which is located in qt/bin/plugins/imageformats. I tried copying it into a plugins folder next to the application, also plugins/imageformats, but it still doesn't work. I also tried to

QApplication::addLibraryPath(QDir::currentPath());

and copy the qgif4.dll file next to my executable - without any success. How do I fix this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

东风软 2024-10-15 12:43:53

将其放入 ./imageformats 中,相对于可执行文件。

Put it in ./imageformats, relative to the executable.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文