代码如下:
a.cpp:
QLabel* wel = new QLabel();
welgif = new QMovie("images/gif/a.gif");
wel->setMovie(welgif);
wel->show();
a.pro:
TEMPLATE = app
CONFIG+=gif
# Input
HEADERS += a.h \
SOURCES += a.cpp \
RESOURCES += a.qrc
a.qrc:
<RCC>
<qresource prefix="/" >
<file>images/logo.png</file>
<file>images/gif/a.gif</file>
</qresource>
</RCC>
编译后
图片没出来,请指点!
用movie->start();
图片就显示了
[ 此贴被leehus在2008-11-06 14:02重新编辑 ]