[Kde-perl] driving the GUI

" Vadim " Vadim
Wed Mar 10 13:35:51 CET 2004



-----Original Message-----
From: Nick THOMPSON <nickthompson at agere.com>
To: kde-perl at kde.org
Date: Wed, 10 Mar 2004 10:35:06 +0000
Subject: [Kde-perl] driving the GUI

> 
> 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...
sub do_somthing_with_data {
    my ( ...., $progress_bar_widget, ....) = @_;
    ....
    # update progress bar
    $progress_bar_wiget->...

}




Vad


More information about the Kde-perl mailing list