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

Richard Dale Richard_Dale at tipitina.demon.co.uk
Sun Jul 11 11:41:39 CEST 2004


On Saturday 10 July 2004 13:10, Richard Dale wrote:
> 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.
I tried increasing the timeout interval to 1 second, and that had no effect. 
Then I commented out the code above that looks for the perl method via 
autoload, and just made it always return false. Apart from stopping signals 
and slots working, so I had to call tableTwoRows() directly, that didn't have 
any effect.

I just couldn't see what the problem was, so I translated the example to C++. 
Guess what? I doesn't work either! So it does look like some sort of Qt bug, 
or maybe the code is using the QTable api wrongly in some way.

-- Richard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tabletest.cpp
Type: text/x-c++src
Size: 4616 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-perl/attachments/20040711/7efaba41/tabletest.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tabletest.h
Type: text/x-chdr
Size: 957 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-perl/attachments/20040711/7efaba41/tabletest-0001.bin


More information about the Kde-perl mailing list