[Kde-perl] After resizing Widget with table, table contents not properly displayed

Richard Dale Richard_Dale at tipitina.demon.co.uk
Sat Jul 10 14:10:52 CEST 2004


On Friday 09 July 2004 09:49, Oliver Kreuer wrote:
> I appended two example scripts. The first shows the strange update
> behaviour. In the second script I reimplemented method resizeEvent. So
> the second one works.
> I also tried the Qt::debug qw(virtual) statement but unfortunately the
> output doesn't give me a clue.
I've been looking at the source in qtable.cpp, and I noticed that QTimers are 
being used:

baldhead duke 1456% grep -i timer qtable.cpp
..
    widgetStretchTimer->stop();
    stretchTimer->start( 0, TRUE );
    widgetStretchTimer->start( 100, TRUE );
    autoScrollTimer->start( 100, TRUE );

So it looks to me that the problem is that perlqt and qtruby are too slow to 
get something done in 100ms, and the timer times out before anything is 
drawn. Everytime a virtual method is called the PerlQt runtime checks to see 
whether on not you have overriden the method in your perl code:

	const char *methodName = smoke->methodNames[smoke->methods[method].name];
	GV *gv = gv_fetchmethod_autoload(stash, methodName, 0);
	if(!gv) return false;

The only way I can think to speed this up is to have some sort of 'virtual 
method callbacks' cache which was only updated when you created a new 
instance of your perl object.

-- Richard


More information about the Kde-perl mailing list