Re: I've a interesting issue with PerlQt 3.008

Germain Garand <[email protected]>
Newsgroups gmane.comp.kde.devel.perl
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.