KProgressDialog / QTimer not working during widget construction

Roger Larsson roger.larsson at norran.net
Mon Nov 4 21:53:10 GMT 2002


On Monday 04 November 2002 21.40, Guillaume Laurent wrote:
> I'm having a problem trying to display a KProgressDialog during a long job 
> which is done during the construction of a widget. It seems that during that 
> time, even if I try to call KApplication::processEvents(), QTimer events are 
> held off. I've tried setting a QTimer::singleShot() with a rather small 
delay 
> (.5 secs), and it doesn't go off until after the widget creation is done, 
> which takes much more than .5 seconds.
> 
> Does anyone has a clue about this problem ?
> 
> Here's a link to a modified version of Qt's 'progress' example, which 
> demonstrates the problem.
> 
> http://telegraph-road.net/tmp/progress_bug.tar.bz2
> 
> I've modified it so it uses a KProgressDialog and starts drawing 100k 
> rectangles in the widget ctor, while calling processEvents() for each 
> rectangle drawn. The KProgressDialog never pops up, and the 2 seconds 
> singleshot QTimer which is armed right before the widget's creation fires 
> only once the widget is done with the drawing.
> 
> Somehow this doesn't look like a bug but more like a deliberate design, but 
> I'd like to know why, and mostly if there's a way around it.
> 

This might be related to 
	http://bugs.kde.org/show_bug.cgi?id=49896
Do you have a "shortcut" bit field in your
	qt-copy/src/kernel/qeventloop_p.h
 (I do not think the patch has made it to qt-copy)

/RogerL

-- 
Roger Larsson
SkellefteƄ
Sweden





More information about the kde-core-devel mailing list