[Kde-perl] I've a interesting issue with PerlQt 3.008
Germain Garand
germain at ebooksfrance.org
Tue Aug 17 03:19:02 CEST 2004
Le Mardi 17 Août 2004 01:36, Gary Greene a écrit :
> I'm only testing the module out on my system, however, I get an error from
> the perl code examples from O'Reilly & Assoc. Programming with Qt 2nd ed.
> Here's the relevant error info below:
Hi Gary,
PerlQt-3 broke backward compatibility with PerlQt-2 in quite some constructs.
Namely here, the "use Qt::app" statement is no more supported, you have to
build the Qt::Application object yourself nowadays.
Try instead:
#!/usr/bin/perl
use Qt;
use strict;
my $app = Qt::Application(\@ARGV);
my $mylabel = Qt::Label( "Hello world", undef );
$mylabel->resize( 120, 30 );
$app->setMainWidget( $mylabel );
$mylabel->show();
exit $app->exec();
Have a look at the current documentation for details.
Greetings,
Germain
More information about the Kde-perl
mailing list