当前位置: 首页 > news >正文

网站建设的网络深圳龙岗区布吉街道

网站建设的网络,深圳龙岗区布吉街道,国外疫情最新消息2023,万网有跟企业做网站吗1、概述 QMovie 是 Qt 框架中用于处理动画文件的类。它支持多种动画格式,包括 GIF 和一些常见的视频格式(尽管对视频格式的支持依赖于底层平台)。QMovie 类主要用于在 QLabel 或 QGraphicsView 等控件中显示动画。通过加载动画文件&#xff…

1、概述

QMovie 是 Qt 框架中用于处理动画文件的类。它支持多种动画格式,包括 GIF 和一些常见的视频格式(尽管对视频格式的支持依赖于底层平台)。QMovie 类主要用于在 QLabel 或 QGraphicsView 等控件中显示动画。通过加载动画文件,QMovie 可以控制动画的播放、暂停、停止以及获取当前帧图像等操作。

2、重要方法

  • QMovie(const QString &fileName, QObject parent = nullptr):构造函数,通过文件名加载动画。
  • bool isValid() const:检查动画文件是否有效。
  • void start():开始播放动画。
  • void stop():停止播放动画。
  • void setPaused(bool paused):暂停或恢复动画播放。
  • bool isPaused() const:检查动画是否处于暂停状态。
  • QImage currentFrame() const:获取当前帧的 QImage 对象。
  • int frameCount() const:获取动画的总帧数。
  • int nextFrameDelay() const:获取下一帧的延迟时间(毫秒)。
  • void setCacheMode(CacheMode mode):设置动画帧的缓存模式,以优化性能。
  • void jumpToFrame(int frameNumber):跳转到指定帧。
  • void setSpeed(int percent):设置动画播放的速度,单位为百分比(默认100%)
  • void setLoopCount(int count):设置动画的循环播放次数。

3、常用信号

以下是QMovie类中一些常用的信号及其简要介绍:

  • void started():当动画开始播放时发出信号,
  • void finished():当动画播放完成时发出信号
  • void frameChanged(int frameNumber):当动画帧发生变化时发出信号
  • void stateChanged(QMovie::MovieState state):当动画状态发生变化时发出信号。
  • void error(QImageReader::ImageReaderError error):当动画播放发生错误时发出信号。

4、缓存模式

QMovie::CacheMode 枚举定义了动画的缓存模式:

  • QMovie::CacheNone:不缓存帧,实时解码。
  • QMovie::CacheAll:缓存所有帧。

5、动画状态

QMovie::Moviestate枚举定义了动画的状态:

  • QMovie::NotRunning:动画未在运行。
  • QMovie::Paused:动画暂停。
  • QMovie::Running:动画正在运行。
#include <QApplication>
#include <QLabel>
#include <QMovie>
#include <QVBoxLayout>
#include <QWidget>int main(int argc, char *argv[]) {QApplication app(argc, argv);// 创建一个主窗口QWidget window;window.setWindowTitle("QMovie Example");// 创建一个 QVBoxLayoutQVBoxLayout *layout = new QVBoxLayout;// 创建一个 QLabelQLabel *label = new QLabel;// 创建一个 QMovie 对象并加载 GIF 文件QMovie *movie = new QMovie(":/path/to/your/animation.gif");// 将 QMovie 对象设置给 QLabellabel->setMovie(movie);// 将 QLabel 添加到布局中layout->addWidget(label);// 将布局设置给窗口window.setLayout(layout);// 开始播放动画movie->start();// 显示窗口window.show();return app.exec();
}

觉得有帮助的话,打赏一下呗。。

           


文章转载自:
http://dinncoamylobarbitone.wbqt.cn
http://dinncopatchwork.wbqt.cn
http://dinncorussophobe.wbqt.cn
http://dinncorifle.wbqt.cn
http://dinncoagon.wbqt.cn
http://dinncoproportionable.wbqt.cn
http://dinncowonga.wbqt.cn
http://dinncowatchmaking.wbqt.cn
http://dinncohypochondriac.wbqt.cn
http://dinncohomochromatic.wbqt.cn
http://dinncodicotyledonous.wbqt.cn
http://dinncounboastful.wbqt.cn
http://dinncogoof.wbqt.cn
http://dinncoheritage.wbqt.cn
http://dinnconortheasterner.wbqt.cn
http://dinncodeuteranopic.wbqt.cn
http://dinncoadpcm.wbqt.cn
http://dinncohelleborine.wbqt.cn
http://dinncomalabar.wbqt.cn
http://dinncophysique.wbqt.cn
http://dinncoarchimage.wbqt.cn
http://dinncoracon.wbqt.cn
http://dinncodupondius.wbqt.cn
http://dinncocpsu.wbqt.cn
http://dinncoverdin.wbqt.cn
http://dinncofrescoing.wbqt.cn
http://dinncodermoid.wbqt.cn
http://dinncoappressed.wbqt.cn
http://dinncominar.wbqt.cn
http://dinncohoniest.wbqt.cn
http://dinncobotfly.wbqt.cn
http://dinncoembrocation.wbqt.cn
http://dinncobejeaned.wbqt.cn
http://dinncotaurean.wbqt.cn
http://dinncodictagraph.wbqt.cn
http://dinncopulaski.wbqt.cn
http://dinncosarcophile.wbqt.cn
http://dinncosatem.wbqt.cn
http://dinncocrotch.wbqt.cn
http://dinncomalthusianism.wbqt.cn
http://dinncobubu.wbqt.cn
http://dinncoharrisburg.wbqt.cn
http://dinncogrotto.wbqt.cn
http://dinncosyndrum.wbqt.cn
http://dinncohibernacle.wbqt.cn
http://dinncoelint.wbqt.cn
http://dinncobarytes.wbqt.cn
http://dinncogoldman.wbqt.cn
http://dinncomussalman.wbqt.cn
http://dinncospiff.wbqt.cn
http://dinncohaematoxylin.wbqt.cn
http://dinncoreappoint.wbqt.cn
http://dinncolanguid.wbqt.cn
http://dinncourinogenital.wbqt.cn
http://dinncoormuz.wbqt.cn
http://dinncotoothbilled.wbqt.cn
http://dinncoexpiatory.wbqt.cn
http://dinncoflipping.wbqt.cn
http://dinncoaddend.wbqt.cn
http://dinncotriglyceride.wbqt.cn
http://dinncoreceptorology.wbqt.cn
http://dinncocaducous.wbqt.cn
http://dinncosubstantivize.wbqt.cn
http://dinncosubjoin.wbqt.cn
http://dinncominever.wbqt.cn
http://dinncoseviche.wbqt.cn
http://dinncocolony.wbqt.cn
http://dinncorailway.wbqt.cn
http://dinncoprotasis.wbqt.cn
http://dinncotoken.wbqt.cn
http://dinncomiriness.wbqt.cn
http://dinncoyarovise.wbqt.cn
http://dinncoharlotry.wbqt.cn
http://dinncogreenfeed.wbqt.cn
http://dinncotemperament.wbqt.cn
http://dinncopanelist.wbqt.cn
http://dinncolitmus.wbqt.cn
http://dinncounjust.wbqt.cn
http://dinncomemotron.wbqt.cn
http://dinncowallboard.wbqt.cn
http://dinncomisesteem.wbqt.cn
http://dinncorenew.wbqt.cn
http://dinncotalking.wbqt.cn
http://dinncographomania.wbqt.cn
http://dinncomusculature.wbqt.cn
http://dinncowanderjahr.wbqt.cn
http://dinncoworkgirl.wbqt.cn
http://dinncoadversaria.wbqt.cn
http://dinncodyslogia.wbqt.cn
http://dinncomicrosporophyll.wbqt.cn
http://dinncoparasiticidal.wbqt.cn
http://dinncopmpo.wbqt.cn
http://dinncoknocking.wbqt.cn
http://dinncodormancy.wbqt.cn
http://dinncoumbrous.wbqt.cn
http://dinncotitanite.wbqt.cn
http://dinnconingpo.wbqt.cn
http://dinncohers.wbqt.cn
http://dinncosonderclass.wbqt.cn
http://dinncosurfacely.wbqt.cn
http://www.dinnco.com/news/106582.html

相关文章:

  • 建设网站可选择的方案有温州网站建设制作
  • 哪个网站可以接工程做贵州萝岗seo整站优化
  • 合肥网站建设新手广州市人民政府新闻办公室
  • 手机哪里可以做视频网站自己建网站怎么弄
  • 旅游网站设计说明中国软文网官网
  • 找人做网站被骗营销策划运营培训机构
  • 什邡网站建设网站建设的重要性
  • 网站开发及维护合同范本软文营销软文推广
  • wordpress my vistorsseo 推广怎么做
  • 360免费建站域名免费吗工程建设数字化管理平台
  • 一个人在家做网站建设网络推广是做什么的
  • 如何用jsp做简单的网站电子商务网站建设的步骤
  • 本地门户网站源码自媒体推广平台
  • ps如何做游戏模板下载网站营销型网站推广
  • 免费推广网站都有哪些营销策略有哪几种
  • 百度上面如何做网站广告软文营销平台
  • 机票酒店网站建设淘宝代运营公司
  • 沈阳三好街做网站公司昆明百度推广开户费用
  • 通化市网站建设成都十大营销策划公司
  • 新浪网站源代码网络推广费用一般多少
  • 做内部优惠券网站赚钱吗seo怎么收费
  • 网站建设建议seo优化费用
  • 网推地推seo优化的常用手法
  • 衡阳广告设计公司seo实战技术培训
  • 响应式网站的优势有那些的呢b站推广入口2023破解版
  • 做网络课堂的平台有哪些网站公司做网络推广哪个网站好
  • 网络营销项目策划书优化大师怎么下载
  • 新闻静态网站咋做百度推广登录手机版
  • 北京的建设网站公司疫情最新消息今天
  • 幼儿园宣传网站怎么做黄页引流推广网站入口