Re: After resizing Widget with table, table contents not properly displayed

Richard Dale <[email protected]>
Newsgroups gmane.comp.kde.devel.perl
Organization Lost Highway
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.