[Kde-perl] driving the GUI

Nick THOMPSON nickthompson at agere.com
Wed Mar 10 11:35:06 CET 2004


Hi,

So, perl and QT have proved extremely useful for writing apps driven by
the GUI. GUI actions can be easily linked to code using the signals and
slots. I have used this to write a wizard which gathers a whole bunch of
information from the user and validate it, but now I want close the
wizard and to go off and do something with the data, while proving a new
progress dialogue to keep the user up-to-data on progress. In this case
there are no GUI events, but my code goes off into the QT event loop
when I do "$app->exec;" and I can't do any processing.

So currently:

# run the wizard
my $wizard = CcmkbrWizard;
$app->setMainWidget($wizard);
$wizard->show;
$app->exec;

# open the progress dialogue
my $progress = Progress;
$app->setMainWidget($progress);
$progress->show;
$app->exec;

# do some processing while updating the progress dialogue...

Can somebody please give me a clue how to proceed (an example maybe)?
When the operation is complete and the progress bar gets to 100%, I will
need to enable the okay button (easy enough) and wait for it to be
clicked, so I will need to be in the event loop for that.

Many thanks,
Nick.



More information about the Kde-perl mailing list