In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
The main content of this article is to explain "what is the method of QT displaying gif and flash animation". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Next, let the editor take you to learn "what is the method of QT displaying gif and flash animation"?
# include # include / / QAxObject * documents = word.querySubObject ("Documents"); void gifplay (QLabel * label) {label- > show ();} void gifclose (QLabel * label) {label- > close ();}
Void flashplay (QAxWidget * flash) {flash- > show ();} void flashclose (QAxWidget * flash) {flash- > close ();} int main (int argc, char * argv []) {QApplication a (argc, argv); QTextCodec::setCodecForLocale (QTextCodec::codecForName ("gb18030")); / / QTextCodec::setCodecForCStrings (QTextCodec::codecForName ("gb18030")); / / QTextCodec::setCodecForTr (QTextCodec::codecForName ("gb18030"))
QAxWidget * flash = new QAxWidget (0QString name=qApp- 0); flash- > resize (600400); flash- > setControl ("{d27cdb6e-ae6d-11cf-96b8-444553540000}"); QString name=qApp- > applicationDirPath (); flash- > dynamicCall ("LoadMovie (long,string)", 0LQ App-> applicationDirPath () + "/ flash2.swf"); flash- > show (); return a.exec () / / QTextCodec * codec = QTextCodec::codecForName ("GB2312"); / / text is GB2312 editor / / QTextCodec::setCodecForLocale (codec); / / set local encoding / / QTextCodec::setCodecForCStrings (codec); / / set string encoding / / QTextCodec::setCodecForTr (codec); / * QAxWidget * flash = new QAxWidget (0Magazine 0); / / QAxWidget uses ActiveX plug-in flash- > resize (800600) / / set the initial size of the control flash- > setControl (QString::fromUtf8 ("{d27cdb6e-ae6d-11cf-96b8-444553540000}")); / / set the controller flash- > dynamicCall ("LoadMovie (long,string)", 0, "D:\ QT_test\\ build-donghua-Desktop_Qt_5_7_0_MinGW_32bit-Debug\\ flash2.swf"); / /
/ / flash- > dynamicCall ("D:\\ QT_test\\ build-donghua-Desktop_Qt_5_7_0_MinGW_32bit-Debug\\ flash2.swf", 0 0); / / flash- > setWindowFlags (Qt::FramelessWindowHint); / / remove the border
/ / ui- > wInfoShow- > setPlainText (flash- > dynamicCall ("TotalFrames") ToString (); / / get properties flash- > dynamicCall ("FrameNum", 200); / / set properties flashplay (flash); QTime t; t.start (); while (t.elapsed () setGeometry (300,300,500,500); label- > setMovie (movie); label- > setScaledContents (true); movie- > start (); gifplay (label); QTime t; t.start (); while (t.elapsed ()
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.