[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: QMovie sort of working with Qt 4.4rc1, but still an issue
From:       Erik <esigra () gmail ! com>
Date:       2008-02-23 10:34:22
Message-ID: 47BFF6AE.9030600 () gmail ! com
[Download RAW message or body]

Thiago Macieira skrev:
> The flash of white I see only in your application, not in the example. I 
> see it once only, at the first loop.
>   
I investigated this issue further. First I found that the flash of white 
can be seen much more clearly when calling movie.setSpeed(10); (as in 
the attached testcase). Then I took a look at the example. It has the 
call movie.setCacheMode(QMovie::CacheAll); (included but commented out 
in the attached testcase). It turns out that this is what makes the 
difference between my minimal testcase and the example.

So adding movie.setCacheMode(QMovie::CacheAll); to the testcase is a 
workaround, fine. But the question remains whether QMovie should show a 
flash of white at the end of the first iteration unless 
movie.setCacheMode(QMovie::CacheAll); is called. If that is the intended 
behaviour, it should at least be mentioned in the documentation 
(http://doc.trolltech.com/main-snapshot/qmovie.html).

["main.cc" (text/x-c++src)]

#include <QtGui/qapplication.h>
#include <QtGui/qlabel.h>
#include <QtGui/qmovie.h>
int main(int argc, char * * argv) {
	QApplication a(argc, argv);
	QMovie movie("panda.mng");
	QLabel label;
	label.resize(96, 96);
	label.setMovie(&movie);
	label.show();
	movie.setSpeed(10);
	//movie.setCacheMode(QMovie::CacheAll);
	movie.start();
	a.connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()));
	return a.exec();
}

["Makefile" (text/plain)]

main: main.cc
	g++ -Wall -Wextra -I /usr/include/qt4 -L /usr/lib/qt4/ -l QtGui main.cc -o main

clean:
	@rm -f Makefile~ main.cc~ main


>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic